Skip to content

Commit

Permalink
Merge branch '2.7' of git://github.com/juju/juju into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRichardson committed Mar 19, 2020
2 parents 4ceedb6 + 8a81b98 commit 8ce0fc7
Show file tree
Hide file tree
Showing 29 changed files with 1,629 additions and 293 deletions.
177 changes: 177 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: "Build"
on: [push, pull_request]
jobs:
linux-amd64:
name: linux-amd64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.10
uses: actions/setup-go@v1
with:
go-version: "1.10"
id: go
- name: Set GOPATH
# temporary fix
# see https://github.com/actions/setup-go/issues/14
run: |
echo "##[set-env name=GOPATH;]$GITHUB_WORKSPACE"
echo "##[add-path]$GITHUB_WORKSPACE/bin"
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
path: src/github.com/juju/juju
- name: Install Vendor dependencies
working-directory: src/github.com/juju/juju
run: |
make dep
shell: bash
- name: Build
working-directory: src/github.com/juju/juju
run: |
GOOS=linux GOARCH=amd64 make go-install
linux-arm64:
name: linux-arm64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.10
uses: actions/setup-go@v1
with:
go-version: "1.10"
id: go
- name: Set GOPATH
# temporary fix
# see https://github.com/actions/setup-go/issues/14
run: |
echo "##[set-env name=GOPATH;]$GITHUB_WORKSPACE"
echo "##[add-path]$GITHUB_WORKSPACE/bin"
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
path: src/github.com/juju/juju
- name: Install Vendor dependencies
working-directory: src/github.com/juju/juju
run: |
make dep
shell: bash
- name: Build
working-directory: src/github.com/juju/juju
run: |
GOOS=linux GOARCH=arm64 make go-install
linux-s390x:
name: linux-s390x
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.10
uses: actions/setup-go@v1
with:
go-version: "1.10"
id: go
- name: Set GOPATH
# temporary fix
# see https://github.com/actions/setup-go/issues/14
run: |
echo "##[set-env name=GOPATH;]$GITHUB_WORKSPACE"
echo "##[add-path]$GITHUB_WORKSPACE/bin"
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
path: src/github.com/juju/juju
- name: Install Vendor dependencies
working-directory: src/github.com/juju/juju
run: |
make dep
shell: bash
- name: Build
working-directory: src/github.com/juju/juju
run: |
GOOS=linux GOARCH=s390x make go-install
linux-ppc64le:
name: linux-ppc64le
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.10
uses: actions/setup-go@v1
with:
go-version: "1.10"
id: go
- name: Set GOPATH
# temporary fix
# see https://github.com/actions/setup-go/issues/14
run: |
echo "##[set-env name=GOPATH;]$GITHUB_WORKSPACE"
echo "##[add-path]$GITHUB_WORKSPACE/bin"
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
path: src/github.com/juju/juju
- name: Install Vendor dependencies
working-directory: src/github.com/juju/juju
run: |
make dep
shell: bash
- name: Build
working-directory: src/github.com/juju/juju
run: |
GOOS=linux GOARCH=ppc64le make go-install
windows-amd64:
name: windows-amd64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.10
uses: actions/setup-go@v1
with:
go-version: "1.10"
id: go
- name: Set GOPATH
# temporary fix
# see https://github.com/actions/setup-go/issues/14
run: |
echo "##[set-env name=GOPATH;]$GITHUB_WORKSPACE"
echo "##[add-path]$GITHUB_WORKSPACE/bin"
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
path: src/github.com/juju/juju
- name: Install Vendor dependencies
working-directory: src/github.com/juju/juju
run: |
make dep
shell: bash
- name: Build
working-directory: src/github.com/juju/juju
run: |
GOOS=windows GOARCH=amd64 make go-install
darwin-amd64:
name: darwin-amd64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.10
uses: actions/setup-go@v1
with:
go-version: "1.10"
id: go
- name: Set GOPATH
# temporary fix
# see https://github.com/actions/setup-go/issues/14
run: |
echo "##[set-env name=GOPATH;]$GITHUB_WORKSPACE"
echo "##[add-path]$GITHUB_WORKSPACE/bin"
shell: bash
- name: Checkout
uses: actions/checkout@v2
with:
path: src/github.com/juju/juju
- name: Install Vendor dependencies
working-directory: src/github.com/juju/juju
run: |
make dep
shell: bash
- name: Build
working-directory: src/github.com/juju/juju
run: |
GOOS=darwin GOARCH=amd64 go install github.com/juju/juju/cmd/juju
8 changes: 4 additions & 4 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
name = "github.com/juju/naturalsort"

[[constraint]]
revision = "a3d14ebcfc135bea4a3e437176f2ddb50c6ffad4"
revision = "ec2036930a9073141bb489423b4a5a7ff13a00c8"
name = "github.com/juju/os"

[[constraint]]
Expand Down Expand Up @@ -123,7 +123,7 @@

[[constraint]]
name = "github.com/lxc/lxd"
revision = "3a5f63bc49591c4cb62268f210b07ff8e74b727d"
revision = "582edb00c72c6bedfa55c2191bbd395512cb0823"

[[constraint]]
name = "github.com/oracle/oci-go-sdk"
Expand Down
14 changes: 13 additions & 1 deletion cmd/juju/application/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"time"

"github.com/juju/bundlechanges"
jujuclock "github.com/juju/clock"
"github.com/juju/cmd"
"github.com/juju/collections/set"
"github.com/juju/errors"
Expand Down Expand Up @@ -174,6 +175,8 @@ type bundleHandler struct {
force bool
trust bool

clock jujuclock.Clock

// bundleDir is the path where the bundle file is located for local bundles.
bundleDir string
// changes holds the changes to be applied in order to deploy the bundle.
Expand Down Expand Up @@ -270,6 +273,9 @@ func makeBundleHandler(bundleData *charm.BundleData, spec bundleDeploySpec) *bun
applications.Add(name)
}
return &bundleHandler{
// TODO (stickupkid): pass this through from the constructor.
clock: jujuclock.WallClock,

dryRun: spec.dryRun,
force: spec.force,
trust: spec.trust,
Expand Down Expand Up @@ -692,11 +698,17 @@ func (h *bundleHandler) addApplication(change *bundlechanges.AddApplicationChang
if len(supportedSeries) == 0 && chID.URL.Series != "" {
supportedSeries = []string{chID.URL.Series}
}

workloadSeries, err := supportedJujuSeries(h.clock.Now(), p.Series, h.modelConfig.ImageStream())
if err != nil {
return errors.Trace(err)
}

selector := seriesSelector{
seriesFlag: p.Series,
charmURLSeries: chID.URL.Series,
supportedSeries: supportedSeries,
supportedJujuSeries: supportedJujuSeries(),
supportedJujuSeries: workloadSeries,
conf: h.modelConfig,
force: h.force,
fromBundle: true,
Expand Down
Loading

0 comments on commit 8ce0fc7

Please sign in to comment.