-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create missing resources that were removed. (#3025)
* Create bump-golang.yml * Create bump-elastic-stack-snapshot.yml
- Loading branch information
Showing
2 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
name: Bump elastic-stack to latest snapshot version | ||
pipelineid: 'bump-elastic-stack-snapshot-{{ requiredEnv "BRANCH" }}' | ||
|
||
actions: | ||
default: | ||
title: '[updatecli] update elastic stack version for testing {{ source "latestVersion" }}-SNAPSHOT' | ||
kind: github/pullrequest | ||
spec: | ||
labels: | ||
- automation | ||
- dependency | ||
- backport-skip | ||
scmid: default | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
user: '{{ requiredEnv "GIT_USER" }}' | ||
email: '{{ requiredEnv "GIT_EMAIL" }}' | ||
owner: elastic | ||
repository: fleet-server | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
username: '{{ requiredEnv "GIT_USER" }}' | ||
branch: '{{ requiredEnv "BRANCH" }}' | ||
|
||
sources: | ||
latestVersion: | ||
name: Get latest snapshot build | ||
kind: json | ||
spec: | ||
file: https://storage.googleapis.com/artifacts-api/snapshots/{{ requiredEnv "BRANCH" }}.json | ||
key: .build_id | ||
|
||
targets: | ||
update-snapshot: | ||
name: "Update snapshot.yml" | ||
kind: file | ||
sourceid: latestVersion | ||
scmid: default | ||
spec: | ||
file: dev-tools/integration/.env | ||
matchpattern: '(ELASTICSEARCH_VERSION)=\d+.\d+.\d+-.*-SNAPSHOT' | ||
replacepattern: '$1={{ source "latestVersion" }}-SNAPSHOT' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
name: Bump golang-version to latest version | ||
|
||
scms: | ||
githubConfig: | ||
kind: github | ||
spec: | ||
user: '{{ requiredEnv "GIT_USER" }}' | ||
email: '{{ requiredEnv "GIT_EMAIL" }}' | ||
owner: elastic | ||
repository: fleet-server | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
username: '{{ requiredEnv "GIT_USER" }}' | ||
branch: main | ||
|
||
actions: | ||
fleet-server: | ||
kind: github/pullrequest | ||
scmid: githubConfig | ||
sourceid: latestGoVersion | ||
spec: | ||
automerge: false | ||
labels: | ||
- dependencies | ||
- backport-skip | ||
title: '[Automation] Bump Golang version to {{ source "latestGoVersion" }}' | ||
|
||
sources: | ||
minor: | ||
name: Get minor version in .go-version | ||
kind: shell | ||
transformers: | ||
- findsubmatch: | ||
pattern: '^\d+.(\d+).\d+$' | ||
captureindex: 1 | ||
spec: | ||
command: cat .go-version | ||
|
||
latestGoVersion: | ||
name: Get Latest Go Release | ||
kind: githubrelease | ||
dependson: | ||
- minor | ||
transformers: | ||
- trimprefix: go | ||
spec: | ||
owner: golang | ||
repository: go | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
username: '{{ requiredEnv "GIT_USER" }}' | ||
versionfilter: | ||
kind: regex | ||
pattern: go1\.{{ source "minor" }}\.(\d*)$ | ||
|
||
gomod: | ||
dependson: | ||
- latestGoVersion | ||
name: Get version in go.mod format | ||
kind: shell | ||
transformers: | ||
- findsubmatch: | ||
pattern: '^(\d+.\d+).\d+' | ||
captureindex: 1 | ||
spec: | ||
command: echo {{ source "latestGoVersion" }} | ||
|
||
conditions: | ||
dockerTag: | ||
name: Is docker image golang:{{ source "latestGoVersion" }} published | ||
kind: dockerimage | ||
spec: | ||
image: golang | ||
tag: '{{ source "latestGoVersion" }}' | ||
sourceid: latestGoVersion | ||
|
||
goDefaultVersion-check: | ||
name: Check if defined golang version differs | ||
kind: shell | ||
sourceid: latestGoVersion | ||
spec: | ||
command: 'grep -v -q {{ source "latestGoVersion" }} .go-version #' | ||
|
||
targets: | ||
update-go-version: | ||
name: "Update .go-version" | ||
sourceid: latestGoVersion | ||
scmid: githubConfig | ||
kind: file | ||
spec: | ||
content: '{{ source "latestGoVersion" }}' | ||
file: .go-version | ||
matchpattern: '\d+.\d+.\d+' | ||
update-golang.ci: | ||
name: "Update .golangci.yml" | ||
sourceid: latestGoVersion | ||
scmid: githubConfig | ||
kind: file | ||
spec: | ||
content: '{{ source "latestGoVersion" }}' | ||
file: .golangci.yml | ||
matchpattern: '\d+.\d+.\d+' | ||
update-gomod: | ||
name: "Update go.mod" | ||
sourceid: gomod | ||
scmid: githubConfig | ||
kind: file | ||
spec: | ||
content: 'go {{ source "gomod" }}' | ||
file: go.mod | ||
matchpattern: 'go \d+.\d+' |