|
| 1 | +--- |
| 2 | +title: "Bump Node.js version" |
| 3 | + |
| 4 | +scms: |
| 5 | + default: |
| 6 | + kind: github |
| 7 | + spec: |
| 8 | + user: "{{ .github.user }}" |
| 9 | + email: "{{ .github.email }}" |
| 10 | + owner: "{{ requiredEnv .github.owner }}" |
| 11 | + repository: "{{ requiredEnv .github.repository }}" |
| 12 | + token: "{{ requiredEnv .github.token }}" |
| 13 | + username: "{{ .github.username }}" |
| 14 | + branch: "{{ .github.branch }}" |
| 15 | + |
| 16 | +sources: |
| 17 | + latestVersion: |
| 18 | + kind: githubRelease |
| 19 | + name: "Get the latest Node.js version" |
| 20 | + spec: |
| 21 | + owner: "nodejs" |
| 22 | + repository: "node" |
| 23 | + token: "{{ requiredEnv .github.token }}" |
| 24 | + username: "{{ .github.username }}" |
| 25 | + versionFilter: |
| 26 | + kind: regex |
| 27 | + pattern: '*LTS*' |
| 28 | + transformers: |
| 29 | + - trimPrefix: "v" |
| 30 | + |
| 31 | +conditions: |
| 32 | + testDockerfileArgVersion: |
| 33 | + name: "Does the Dockerfile have an ARG instruction which key is nodejs_version?" |
| 34 | + kind: dockerfile |
| 35 | + spec: |
| 36 | + file: Dockerfile |
| 37 | + instruction: |
| 38 | + keyword: "ARG" |
| 39 | + matcher: "nodejs_version" |
| 40 | + testVersionInReadme: |
| 41 | + name: "Does the README.adoc have a variable NODEJS_VERSION" |
| 42 | + kind: file |
| 43 | + spec: |
| 44 | + file: README.adoc |
| 45 | + matchPattern: '(?m:^:NODEJS_VERSION:.*)' |
| 46 | + testVersionInTestHarness: |
| 47 | + name: "Does the test harness have variable NODEJS_VERSION" |
| 48 | + kind: file |
| 49 | + spec: |
| 50 | + file: tests/asciidoctor.bats |
| 51 | + matchPattern: '(?m:^NODEJS_VERSION=.*)' |
| 52 | + |
| 53 | +targets: |
| 54 | + updateDockerfile: |
| 55 | + name: "Update the value of ARG nodejs_version in the Dockerfile" |
| 56 | + kind: dockerfile |
| 57 | + spec: |
| 58 | + file: Dockerfile |
| 59 | + instruction: |
| 60 | + keyword: "ARG" |
| 61 | + matcher: "nodejs_version" |
| 62 | + scmID: default |
| 63 | + updateTestHarness: |
| 64 | + name: "Update the key NODEJS_VERSION in the test harness" |
| 65 | + kind: file |
| 66 | + spec: |
| 67 | + file: tests/asciidoctor.bats |
| 68 | + matchPattern: '(?m:^NODEJS_VERSION=.*)' |
| 69 | + content: 'NODEJS_VERSION={{ source `latestVersion` }}' |
| 70 | + scmID: default |
| 71 | + updateReadme: |
| 72 | + name: "Update the key NODEJS_VERSION in the README.adoc file" |
| 73 | + kind: file |
| 74 | + spec: |
| 75 | + file: README.adoc |
| 76 | + matchPattern: '(?m:^:NODEJS_VERSION:.*)' |
| 77 | + content: ':NODEJS_VERSION: {{ source `latestVersion` }}' |
| 78 | + scmID: default |
| 79 | + |
| 80 | +pullrequests: |
| 81 | + default: |
| 82 | + kind: github |
| 83 | + scmID: default |
| 84 | + targets: |
| 85 | + - updateDockerfile |
| 86 | + - updateTestHarness |
| 87 | + - updateReadme |
| 88 | + spec: |
| 89 | + labels: |
| 90 | + - chore |
| 91 | + - dependencies |
0 commit comments