diff --git a/updatecli/scripts/run-go-generate.sh b/updatecli/scripts/run-go-generate.sh new file mode 100755 index 0000000000..c230f57c93 --- /dev/null +++ b/updatecli/scripts/run-go-generate.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux + +./scripts/download >&2 +go generate >&2 +git diff + +exit 0 + diff --git a/updatecli/updatecli.d/local-path-provisioner.yaml b/updatecli/updatecli.d/local-path-provisioner.yaml index 277020651f..1cd2d6808a 100644 --- a/updatecli/updatecli.d/local-path-provisioner.yaml +++ b/updatecli/updatecli.d/local-path-provisioner.yaml @@ -47,6 +47,14 @@ sources: token: "{{ requiredEnv .github.token }}" versionfilter: kind: "latest" + get-pwd: + name: "Run Updatecli execution directory" + kind: "shell" + disablesourceinput: true + spec: + command: 'pwd' + environments: + - name: PATH conditions: local-path-provisioner: @@ -68,3 +76,16 @@ targets: - "scripts/airgap/image-list.txt" matchpattern: 'rancher/local-path-provisioner:v\d+\.\d+\.\d+(-\w+)?' replacepattern: 'rancher/local-path-provisioner:{{ source `local-path-provisioner` }}' + go-generate: + name: "Run go generate" + kind: "shell" + scmid: "k3s" + dependson: + - "local-path-provisioner" + disablesourceinput: true + spec: + command: '{{ source "get-pwd" }}/updatecli/scripts/run-go-generate.sh' + environments: + - name: PATH + - name: HOME +