|
| 1 | +# This small test makes sure that updatecli is working properly on a repo. |
| 2 | +# In the future, more useful files should be added to this directory. |
| 3 | +--- |
| 4 | +name: "Introduce updatecli to repo and validate basic functionality" |
| 5 | +# Make sure we can pull in github repos from multiple orgs |
| 6 | +scms: |
| 7 | + klipper-helm: |
| 8 | + kind: "github" |
| 9 | + spec: |
| 10 | + user: "{{ .github.user }}" |
| 11 | + email: "{{ .github.email }}" |
| 12 | + username: "{{ requiredEnv .github.username }}" |
| 13 | + token: '{{ requiredEnv .github.token }}' |
| 14 | + owner: "{{ .klipper-helm.org }}" |
| 15 | + repository: "{{ .klipper-helm.repo }}" |
| 16 | + branch: "{{ .klipper-helm.branch }}" |
| 17 | + go: |
| 18 | + kind: "github" |
| 19 | + spec: |
| 20 | + user: "{{ .github.user }}" |
| 21 | + email: "{{ .github.email }}" |
| 22 | + username: "{{ requiredEnv .github.username }}" |
| 23 | + token: '{{ requiredEnv .github.token }}' |
| 24 | + owner: "{{ .go.org }}" |
| 25 | + repository: "{{ .go.repo }}" |
| 26 | + branch: "{{ .go.branch }}" |
| 27 | + |
| 28 | +sources: |
| 29 | + # validate gittag parsing external public repos |
| 30 | + goTag: |
| 31 | + name: "Get Go 1.20.2 tag" |
| 32 | + kind: "gittag" |
| 33 | + scmid: "go" |
| 34 | + spec: |
| 35 | + versionfilter: |
| 36 | + kind: "regex" |
| 37 | + pattern: '^go1\.20\.2$' |
| 38 | + |
| 39 | +# Validate read access to local repo |
| 40 | +## continue to targets if the go version in the validate file doesn't match the goTag source |
| 41 | +conditions: |
| 42 | + testVersionShouldMatchGoTag: |
| 43 | + name: test version should match go tag |
| 44 | + kind: yaml |
| 45 | + sourceid: goTag |
| 46 | + spec: |
| 47 | + file: "updatecli/validate.yml" |
| 48 | + key: version |
| 49 | + failwhen: true #if set to true, continue to targets when condition is true rather than false |
| 50 | + |
| 51 | +# Validate the ability to generate branches, commits, what the commits look like, and what branches look like |
| 52 | +## allow validation of workflow to delete unused branch after merge |
| 53 | +## generate a commit on a branch named updatecli_<256 sha of change> |
| 54 | +## the commit message will be automatically generated by updatecli based on the change |
| 55 | +targets: |
| 56 | + updateValidateFile: |
| 57 | + name: "Update the version in the validate file" |
| 58 | + kind: "yaml" |
| 59 | + scmid: "klipper-helm" |
| 60 | + sourceid: goTag |
| 61 | + spec: |
| 62 | + file: "updatecli/validate.yml" |
| 63 | + key: version |
| 64 | + |
| 65 | +# Validate generating a pull request |
| 66 | +actions: |
| 67 | + # create a pull request which is not allowed to automerge |
| 68 | + # the title matches the commit message |
| 69 | + github: |
| 70 | + kind: "github/pullrequest" |
| 71 | + scmid: "klipper-helm" |
| 72 | + spec: |
| 73 | + automerge: false |
| 74 | + draft: false |
| 75 | + mergemethod: squash |
| 76 | + parent: false # this would allow for making a PR to an upstream fork, if we ran updatecli from a fork |
0 commit comments