Run go generate in local-path-provisioner Updatecli pipeline (#7181)

Signed-off-by: Guilherme Macedo <guilherme.macedo@suse.com>
This commit is contained in:
Guilherme Macedo 2023-04-03 13:30:56 -03:00 committed by GitHub
parent 8ec7d5e6b0
commit 37b3f4d25c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#!/bin/bash
set -eux
./scripts/download >&2
go generate >&2
git diff
exit 0

View File

@ -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