Skip to content

Commit

Permalink
chore(goss): update updatecli manifest target (#896)
Browse files Browse the repository at this point in the history
* chore(updatecli) update manifest to upgrade goss tested versions

* fixup after #897

Signed-off-by: Damien Duportal <[email protected]>

* chore(updatecli) track azcopy version

Signed-off-by: Damien Duportal <[email protected]>

---------

Signed-off-by: Damien Duportal <[email protected]>
Co-authored-by: Damien Duportal <[email protected]>
  • Loading branch information
smerle33 and dduportal authored Nov 13, 2023
1 parent 9a1cf43 commit ec842e1
Show file tree
Hide file tree
Showing 16 changed files with 119 additions and 21 deletions.
2 changes: 1 addition & 1 deletion updatecli/updatecli.d/asdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ targets:
name: Update the ASDF version in the goss test
kind: yaml
spec:
file: "goss/goss.yaml"
file: "goss/goss-linux.yaml"
key: $.command.asdf.stdout[0]
transformers:
- addprefix: "v"
Expand Down
9 changes: 8 additions & 1 deletion updatecli/updatecli.d/awscli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ targets:
kind: yaml
spec:
file: "provisioning/tools-versions.yml"
key: "awscli_version"
key: "$.awscli_version"
scmid: default
updateVersionInGoss:
name: Update the `aws` CLI version in the goss test
kind: yaml
spec:
file: "goss/goss-linux.yaml"
key: $.command.awscli.stdout[0]
scmid: default

actions:
Expand Down
50 changes: 50 additions & 0 deletions updatecli/updatecli.d/azcopy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bump `azcopy` version

scms:
default:
kind: github
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"

sources:
lastReleaseVersion:
kind: shell
name: Get the latest `azcopy` (full) version
spec:
command: bash -c 'basename "$(dirname "$(curl https://aka.ms/downloadazcopy-v10-linux --write-out "%{redirect_url}" --output /dev/null --silent --fail --show-error)" )"'
transformers:
- trimprefix: 'release-'

targets:
updateVersion:
name: "Update the `azcopy` version in the provision-env.yml file"
sourceid: lastReleaseVersion
kind: yaml
spec:
file: provisioning/tools-versions.yml
key: $.azcopy_version
scmid: default
updateVersionInGoss:
name: Update the `azcopy` version in the goss test
kind: yaml
spec:
file: goss/goss-linux.yaml
key: $.command.azcopy.stdout[0]
scmid: default

actions:
default:
kind: github/pullrequest
title: Bump azcopy version to {{ source "lastReleaseVersion" }}
scmid: default
spec:
labels:
- enhancement
- azcopy
11 changes: 9 additions & 2 deletions updatecli/updatecli.d/azure-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ sources:

targets:
updateVersion:
name: "Update the azure-cli version in the provision-env.yml file"
name: "Update the `azure-cli` version in the provision-env.yml file"
sourceid: lastReleaseVersion
kind: yaml
spec:
file: "provisioning/tools-versions.yml"
key: "azurecli_version"
key: "$.azurecli_version"
scmid: default
updateVersionInGoss:
name: Update the `azure-cli` version in the goss test
kind: yaml
spec:
file: "goss/goss-linux.yaml"
key: $.command.azurecli.stdout[0]
scmid: default

actions:
Expand Down
13 changes: 11 additions & 2 deletions updatecli/updatecli.d/container-structure-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ sources:

targets:
updateVersion:
name: "Update the container-structure-test version in the provision-env.yml file"
name: "Update the `container-structure-test` version in the provision-env.yml file"
sourceid: lastReleaseVersion
kind: yaml
spec:
file: "provisioning/tools-versions.yml"
key: "cst_version"
key: "$.cst_version"
scmid: default
updateVersionInGoss:
name: Update the `container-structure-test` version in the goss test
kind: yaml
spec:
file: "goss/goss-linux.yaml"
key: $.command.container-structure-test.stdout[0]
transformers:
- addprefix: "v"
scmid: default

actions:
Expand Down
19 changes: 14 additions & 5 deletions updatecli/updatecli.d/docker-ce.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Bump docker-ce version
name: Bump Docker CE version

scms:
default:
Expand All @@ -19,6 +19,8 @@ sources:
kind: shell
spec:
command: bash ./updatecli/scripts/run-in-docker.sh ./updatecli/scripts/fetch-docker-ce-latest-version.sh
environments:
- name: PATH

conditions:
checkIfWindowsReleaseIsAvailable:
Expand All @@ -29,18 +31,25 @@ conditions:

targets:
updateVersion:
name: "Update the docker-ce version in the provision-env.yml file"
name: Update the Docker CE version in the provision-env.yml file
sourceid: lastReleaseVersion
kind: yaml
spec:
file: "provisioning/tools-versions.yml"
key: "docker_version"
file: provisioning/tools-versions.yml
key: $.docker_version
scmid: default
updateVersionInGoss:
name: Update the Docker CE version in the Linux goss test harness
kind: yaml
spec:
file: goss/goss-linux.yaml
key: $.command.docker-ce.stdout[0]
scmid: default

actions:
default:
kind: github/pullrequest
title: Bump docker-ce version to {{ source "lastReleaseVersion" }}
title: Bump Docker CE version to {{ source "lastReleaseVersion" }}
scmid: default
spec:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ sources:

targets:
updateDockerComposeVersion:
name: Update the DockerCompose version in the Packer default values
name: Update the `DockerCompose` version in the Packer default values
kind: yaml
spec:
file: "provisioning/tools-versions.yml"
key: "compose_version"
scmid: default
updateVersionInGoss:
name: Update the `DockerCompose` version in the goss test
kind: yaml
spec:
file: "goss/goss-linux.yaml"
key: $.command.docker_compose.stdout[0]
scmid: default

actions:
default:
Expand Down
9 changes: 8 additions & 1 deletion updatecli/updatecli.d/github-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,20 @@ sources:

targets:
updateVersion:
name: "Update the GitHub CLI (gh) version in the provision-env.yml file"
name: "Update the `GitHub CLI (gh)` version in the provision-env.yml file"
sourceid: lastReleaseVersion
kind: yaml
spec:
file: "provisioning/tools-versions.yml"
key: "gh_version"
scmid: default
updateVersionInGoss:
name: Update the `GitHub CLI (gh)` version in the goss test
kind: yaml
spec:
file: "goss/goss-linux.yaml"
key: $.command.gh_cli.stdout[0]
scmid: default

actions:
default:
Expand Down
4 changes: 2 additions & 2 deletions updatecli/updatecli.d/jdk11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ targets:
kind: yaml
spec:
files:
- goss/goss.yaml
- goss/goss-linux.yaml
- goss/goss-windows.yaml
key: $.command.jdk11.stdout[0]
scmid: default
Expand All @@ -61,7 +61,7 @@ targets:
spec:
files:
# TODO: add 'default_java' in linux tests harness
# - goss/goss.yaml
# - goss/goss-linux.yaml
- goss/goss-windows.yaml
key: $.command.default_java.stdout[0]
scmid: default
Expand Down
2 changes: 1 addition & 1 deletion updatecli/updatecli.d/jdk17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ targets:
kind: yaml
spec:
files:
- goss/goss.yaml
- goss/goss-linux.yaml
- goss/goss-windows.yaml
key: $.command.jdk17.stdout[0]
scmid: default
Expand Down
2 changes: 1 addition & 1 deletion updatecli/updatecli.d/jdk21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ targets:
kind: yaml
spec:
files:
- goss/goss.yaml
- goss/goss-linux.yaml
- goss/goss-windows.yaml
key: $.command.jdk21.stdout[0]
scmid: default
Expand Down
2 changes: 1 addition & 1 deletion updatecli/updatecli.d/jdk8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ targets:
- addprefix: '1.8.0_'
spec:
files:
- goss/goss.yaml
- goss/goss-linux.yaml
- goss/goss-windows.yaml
key: $.command.jdk8.stderr[0]
scmid: default
Expand Down
2 changes: 1 addition & 1 deletion updatecli/updatecli.d/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ targets:
sourceid: lastReleaseVersion
kind: yaml
spec:
file: goss/goss.yaml
file: goss/goss-linux.yaml
key: $.command.nodejs.stdout[0]
scmid: default

Expand Down
2 changes: 1 addition & 1 deletion updatecli/updatecli.d/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ targets:
name: "Update the playwright version in the goss test"
kind: yaml
spec:
file: goss/goss.yaml
file: goss/goss-linux.yaml
key: $.command.playwright_version.stdout[0]
scmid: default

Expand Down
2 changes: 2 additions & 0 deletions updatecli/updatecli.d/python3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ sources:
name: Get the latest python3 version
spec:
command: curl https://endoflife.date/api/python.json --silent --show-error | jq -r '.[0].latest'
environments:
- name: PATH

conditions:
## Only check for chocolatey package
Expand Down
2 changes: 1 addition & 1 deletion updatecli/updatecli.d/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ targets:
kind: yaml
spec:
files:
- goss/goss.yaml
- goss/goss-linux.yaml
- goss/goss-windows.yaml
key: $.command.trivy.stdout[0]
scmid: default
Expand Down

0 comments on commit ec842e1

Please sign in to comment.