File updatecli.obscpio of Package image-build-base
07070100000000000081a400000000000000000000000167a4c679000005c4000000000000000000000000000000000000002000000000updatecli/updatecli.d/trivy.yml---
name: "Bump Trivy version"
scms:
image-build-base:
kind: "github"
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
username: "{{ .github.username }}"
token: "{{ requiredEnv .github.token }}"
owner: "rancher"
repository: "image-build-base"
branch: "master"
commitmessage:
title: "Bump Trivy version"
sources:
trivy-release:
name: "Get Trivy latest release"
kind: "githubrelease"
spec:
owner: "aquasecurity"
repository: "trivy"
token: "{{ requiredEnv .github.token }}"
versionfilter:
kind: "latest"
transformers:
- trimprefix: "v"
conditions:
trivy-version:
name: "Check Trivy version in Dockerfile"
kind: "file"
scmid: "image-build-base"
disablesourceinput: true
spec:
files:
- "Dockerfile"
matchpattern: 'TRIVY_VERSION={{ source `trivy-release` }}'
failwhen: true
targets:
trivy-version:
name: "Update Trivy version in Dockerfile"
kind: "file"
scmid: "image-build-base"
disablesourceinput: true
spec:
files:
- "Dockerfile"
matchpattern: 'TRIVY_VERSION=\d+\.\d+.\d+'
replacepattern: 'TRIVY_VERSION={{ source `trivy-release` }}'
actions:
github:
title: "Bump Trivy version"
kind: "github/pullrequest"
scmid: "image-build-base"
spec:
automerge: false
draft: false
mergemethod: "squash"
parent: false
07070100000001000081a400000000000000000000000167a4c67900000a74000000000000000000000000000000000000002400000000updatecli/updatecli.d/updatecli.yml# This small test makes sure that updatecli is working properly on a repo.
# To test this:
# have "UPDATECLI_GITHUB_ACTOR" env set to your github username
# have "UPDATECLI_GITHUB_TOKEN" env set to your github token
# have the latest version of updatecli installed
# 'updatecli diff -v updatecli/values.yaml -c updatecli/updatecli.d/updatecli.yml'
# In the future, more useful files should be added to this directory.
---
name: "Introduce updatecli to repo and validate basic functionality"
# Make sure we can pull in github repos from multiple orgs
scms:
image-build-base:
kind: "github"
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
username: "{{ requiredEnv .github.username }}"
token: '{{ requiredEnv .github.token }}'
owner: rancher
repository: image-build-base
branch: master
go:
kind: "github"
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
username: "{{ requiredEnv .github.username }}"
token: '{{ requiredEnv .github.token }}'
owner: golang
repository: go
branch: master
sources:
# validate gittag parsing external public repos
goTag:
name: "Get Go 1.20.2 tag"
kind: "gittag"
scmid: "go"
spec:
versionfilter:
kind: "regex"
pattern: '^go1\.20\.2$'
# Validate read access to local repo
## continue to targets if the go version in the validate file doesn't match the goTag source
conditions:
testVersionShouldMatchGoTag:
name:
kind: yaml
sourceid: goTag
spec:
file: "updatecli/validate.yml"
key: version
failwhen: true #if set to true, continue to targets when condition is true rather than false
# Validate the ability to generate branches, commits, what the commits look like, and what branches look like
## allow validation of workflow to delete unused branch after merge
## generate a commit on a branch named updatecli_<256 sha of change>
## the commit message will be automatically generated by updatecli based on the change
targets:
updateValidateFile:
name: "Update the version in the validate file"
kind: "yaml"
scmid: image-build-base
sourceid: goTag
spec:
file: "updatecli/validate.yml"
key: version
# Validate generating a pull request
actions:
# create a pull request which is not allowed to automerge
# the title matches the commit message
github:
kind: "github/pullrequest"
scmid: image-build-base
spec:
automerge: false
draft: false
mergemethod: squash
parent: false # this would allow for making a PR to an upstream fork, if we ran updatecli from a fork
07070100000002000041ed00000000000000000000000167a4c67900000000000000000000000000000000000000000000001600000000updatecli/updatecli.d07070100000003000081a400000000000000000000000167a4c67900000012000000000000000000000000000000000000001700000000updatecli/validate.ymlversion: go1.20.2
07070100000004000081a400000000000000000000000167a4c679000000ae000000000000000000000000000000000000001600000000updatecli/values.yamlgithub:
user: "github-actions[bot]"
email: "41898282+github-actions[bot]@users.noreply.github.com"
username: "UPDATECLI_GITHUB_ACTOR"
token: "UPDATECLI_GITHUB_TOKEN"
07070100000005000041ed00000000000000000000000167a4c67900000000000000000000000000000000000000000000000a00000000updatecli07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!