Browse Source

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

Signed-off-by: Guilherme Macedo <guilherme.macedo@suse.com>
pull/7204/head
Guilherme Macedo 2 years ago committed by GitHub
parent
commit
37b3f4d25c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      updatecli/scripts/run-go-generate.sh
  2. 21
      updatecli/updatecli.d/local-path-provisioner.yaml

10
updatecli/scripts/run-go-generate.sh

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

21
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

Loading…
Cancel
Save