diff --git a/rancher-machine.yaml b/rancher-machine.yaml new file mode 100644 index 00000000000..57925ff5218 --- /dev/null +++ b/rancher-machine.yaml @@ -0,0 +1,75 @@ +#nolint:valid-pipeline-git-checkout-tag +package: + name: rancher-machine + # Upstream doesn't follow proper symantic versioning, even though there are newer 0.16.x + # tags, they are not newer releases than 0.15.0-rancherN. This is a forked version of + # docker/machine and upstream also archieved and deprecated. So it's OK to use the + # master branch here. + version: "0.15.0.126" + epoch: 0 + description: Machine management for a container-centric world + copyright: + - license: Apache-2.0 + +var-transforms: + - from: ${{package.version}} + match: '\.(\d+)$' + replace: "-rancher$1" + to: mangled-package-version + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/rancher/machine + expected-commit: 9d46e6bb16f98d184afa83267ea28d3dcc898478 + tag: v${{vars.mangled-package-version}} + + - uses: go/bump + with: + deps: |- + github.com/golang-jwt/jwt/v4@v4.5.2 + golang.org/x/crypto@v0.35.0 + golang.org/x/net@v0.36.0 + golang.org/x/oauth2@v0.27.0 + + - uses: go/build + with: + modroot: . + packages: ./cmd/rancher-machine + output: rancher-machine + ldflags: | + -X github.com/rancher/machine/version.Version=${{package.version}} + -X github.com/rancher/machine/version.GitCommit=$(git rev-parse HEAD) + +update: + enabled: true + ignore-regex-patterns: + - patch + version-transform: + - match: -rancher + replace: . + git: + tag-filter-prefix: v0.15.0-rancher + strip-prefix: v + +test: + pipeline: + - name: Smoke check - help and version + runs: | + rancher-machine --help + rancher-machine --version | grep ${{package.version}} + - name: Create a machine using the none driver + runs: | + rancher-machine create --driver none --url localhost test-machine + rancher-machine ls | grep test-machine + - name: Inspect the machine + runs: | + rancher-machine inspect test-machine | grep -qi '"DriverName": "none"' + - name: Run non-invasive subcommands + runs: | + rancher-machine url test-machine | grep -q "localhost" + rancher-machine ip test-machine + - name: Remove the machine + runs: | + rancher-machine rm -f test-machine + rancher-machine ls | grep -vq test-machine