From 37b3f4d25cfd120237800150507fda3eba44b3fe Mon Sep 17 00:00:00 2001 From: Guilherme Macedo Date: Mon, 3 Apr 2023 13:30:56 -0300 Subject: [PATCH] Run go generate in local-path-provisioner Updatecli pipeline (#7181) Signed-off-by: Guilherme Macedo --- updatecli/scripts/run-go-generate.sh | 10 +++++++++ .../updatecli.d/local-path-provisioner.yaml | 21 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 updatecli/scripts/run-go-generate.sh 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 +