Skip to content

Commit

Permalink
Merge pull request #228 from dduportal/chore/updatecli-simplification
Browse files Browse the repository at this point in the history
chore(updatecli) update manifests (using a "file" resource) to manage both README.adoc and test harness
  • Loading branch information
dduportal authored Nov 7, 2021
2 parents 6eef722 + c360eb3 commit 31c32ac
Show file tree
Hide file tree
Showing 13 changed files with 464 additions and 166 deletions.
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
:ALPINE_VERSION: 3.13.6
:ASCIIDOCTOR_VERSION: 2.0.15
:ASCIIDOCTOR_VERSION: 2.0.16
:ASCIIDOCTOR_CONFLUENCE_VERSION: 0.0.2
:ASCIIDOCTOR_PDF_VERSION: 1.6.0
:ASCIIDOCTOR_DIAGRAM_VERSION: 2.1.2
:ASCIIDOCTOR_PDF_VERSION: 1.6.1
:ASCIIDOCTOR_DIAGRAM_VERSION: 2.2.1
:ASCIIDOCTOR_EPUB3_VERSION: 1.5.1
:ASCIIDOCTOR_FB2_VERSION: 0.5.1
:ASCIIDOCTOR_MATHEMATICAL_VERSION: 0.3.5
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

This Docker image provides:

- [Asciidoctor](https://asciidoctor.org/) 2.0.15
- [Asciidoctor](https://asciidoctor.org/) 2.0.16

- [Asciidoctor Diagram](https://asciidoctor.org/docs/asciidoctor-diagram/) 2.1.2 with ERD and Graphviz integration (supports plantuml and graphiz diagrams)
- [Asciidoctor Diagram](https://asciidoctor.org/docs/asciidoctor-diagram/) 2.2.1 with ERD and Graphviz integration (supports plantuml and graphiz diagrams)

- [Asciidoctor PDF](https://asciidoctor.org/docs/asciidoctor-pdf/) 1.6.0
- [Asciidoctor PDF](https://asciidoctor.org/docs/asciidoctor-pdf/) 1.6.1

- [Asciidoctor EPUB3](https://asciidoctor.org/docs/asciidoctor-epub3/) 1.5.1

Expand Down
57 changes: 42 additions & 15 deletions updatecli/updatecli.d/Mogztter-kroki.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Bump Asciidoctor-Kroki version"
sources:
getAsciidoctorKrokiVersion:
default:
kind: githubRelease
name: "Get the latest Asciidoctor-Kroki version"
spec:
Expand All @@ -23,14 +23,27 @@ conditions:
instruction:
keyword: "ARG"
matcher: "asciidoctor_kroki_version"
testVersionInReadme:
name: "Does the README.adoc have a variable ASCIIDOCTOR_KROKI_VERSION"
kind: file
spec:
file: README.adoc
matchPattern: '(?m:^:ASCIIDOCTOR_KROKI_VERSION:.*)'
testVersionInTestHarness:
name: "Does the test harness have variable ASCIIDOCTOR_KROKI_VERSION"
kind: file
spec:
file: tests/asciidoctor.bats
matchPattern: '(?m:^ASCIIDOCTOR_KROKI_VERSION=.*)'
targets:
updateHarnessEnvAsciidoctorKrokiVersion:
name: "Update the key ASCIIDOCTOR_KROKI_VERSION in the test harness env_vars.yml file"
kind: yaml
sourceID: getAsciidoctorKrokiVersion
updateDockerfile:
name: "Update the value of ARG asciidoctor_kroki_version in the Dockerfile"
kind: dockerfile
spec:
file: "tests/env_vars.yml"
key: "ASCIIDOCTOR_KROKI_VERSION"
file: Dockerfile
instruction:
keyword: "ARG"
matcher: "asciidoctor_kroki_version"
scm:
github:
user: "{{ .github.user }}"
Expand All @@ -40,15 +53,29 @@ targets:
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateDockerfileArgVersion:
name: "Update the value of ARG asciidoctor_kroki_version in the Dockerfile"
sourceID: getAsciidoctorKrokiVersion
kind: dockerfile
updateTestHarness:
name: "Update the key ASCIIDOCTOR_KROKI_VERSION in the test harness"
kind: file
spec:
file: Dockerfile
instruction:
keyword: "ARG"
matcher: "asciidoctor_kroki_version"
file: tests/asciidoctor.bats
matchPattern: '(?m:^ASCIIDOCTOR_KROKI_VERSION=.*)'
content: 'ASCIIDOCTOR_KROKI_VERSION={{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ requiredEnv .github.owner }}"
repository: "{{ requiredEnv .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateReadme:
name: "Update the key ASCIIDOCTOR_KROKI_VERSION in the README.adoc file"
kind: file
spec:
file: README.adoc
matchPattern: '(?m:^:ASCIIDOCTOR_KROKI_VERSION:.*)'
content: ':ASCIIDOCTOR_KROKI_VERSION: {{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
Expand Down
46 changes: 37 additions & 9 deletions updatecli/updatecli.d/alpine-linux.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Bump Alpine Linux Version"
sources:
getAlpineLinuxVersion:
default:
kind: githubRelease
name: "Get the latest Alpine Linux version"
spec:
Expand All @@ -11,6 +11,7 @@ sources:
username: "{{ .github.username }}"
versionFilter:
kind: regex
# Stay on Alpine 3.13 mainline because of https://github.com/asciidoctor/docker-asciidoctor/pull/216
pattern: '3.13.(\d*)'
transformers:
- trimPrefix: "v"
Expand All @@ -28,10 +29,21 @@ conditions:
kind: dockerImage
spec:
image: "alpine"
testVersionInReadme:
name: "Does the README.adoc have a variable ALPINE_VERSION"
kind: file
spec:
file: README.adoc
matchPattern: '(?m:^:ALPINE_VERSION:.*)'
testVersionInTestHarness:
name: "Does the test harness have variable ALPINE_VERSION"
kind: file
spec:
file: tests/asciidoctor.bats
matchPattern: '(?m:^ALPINE_VERSION=.*)'
targets:
updateDockerfileArgVersion:
updateDockerfile:
name: "Update the value of the base image (ARG alpine_version) in the Dockerfile"
sourceID: getAlpineLinuxVersion
kind: dockerfile
spec:
file: Dockerfile
Expand All @@ -47,13 +59,29 @@ targets:
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateHarnessEnvAlpineVersion:
name: "Update the key ALPINE_VERSION in the test harness env_vars.yml file"
kind: yaml
sourceID: getAlpineLinuxVersion
updateTestHarness:
name: "Update the key ALPINE_VERSION in the test harness"
kind: file
spec:
file: tests/asciidoctor.bats
matchPattern: '(?m:^ALPINE_VERSION=.*)'
content: 'ALPINE_VERSION={{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ requiredEnv .github.owner }}"
repository: "{{ requiredEnv .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateReadme:
name: "Update the key ALPINE_VERSION in the README.adoc file"
kind: file
spec:
file: "tests/env_vars.yml"
key: "ALPINE_VERSION"
file: README.adoc
matchPattern: '(?m:^:ALPINE_VERSION:.*)'
content: ':ALPINE_VERSION: {{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
Expand Down
57 changes: 42 additions & 15 deletions updatecli/updatecli.d/asciidoctor-bibtex.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Bump Asciidoctor-Bibtex version"
sources:
getAsciidoctorBibtexVersion:
default:
kind: githubRelease
name: "Get the latest Asciidoctor-Bibtex version"
spec:
Expand All @@ -22,14 +22,27 @@ conditions:
instruction:
keyword: "ARG"
matcher: "asciidoctor_bibtex_version"
testVersionInReadme:
name: "Does the README.adoc have a variable ASCIIDOCTOR_BIBTEX_VERSION"
kind: file
spec:
file: README.adoc
matchPattern: '(?m:^:ASCIIDOCTOR_BIBTEX_VERSION:.*)'
testVersionInTestHarness:
name: "Does the test harness have variable ASCIIDOCTOR_BIBTEX_VERSION"
kind: file
spec:
file: tests/asciidoctor.bats
matchPattern: '(?m:^ASCIIDOCTOR_BIBTEX_VERSION=.*)'
targets:
updateHarnessEnvAsciidoctorBibtexVersion:
name: "Update the key ASCIIDOCTOR_BIBTEX_VERSION in the test harness env_vars.yml file"
kind: yaml
sourceID: getAsciidoctorBibtexVersion
updateDockerfile:
name: "Update the value of ARG asciidoctor_bibtex_version in the Dockerfile"
kind: dockerfile
spec:
file: "tests/env_vars.yml"
key: "ASCIIDOCTOR_BIBTEX_VERSION"
file: Dockerfile
instruction:
keyword: "ARG"
matcher: "asciidoctor_bibtex_version"
scm:
github:
user: "{{ .github.user }}"
Expand All @@ -39,15 +52,29 @@ targets:
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateDockerfileArgVersion:
name: "Update the value of ARG asciidoctor_bibtex_version in the Dockerfile"
sourceID: getAsciidoctorBibtexVersion
kind: dockerfile
updateTestHarness:
name: "Update the key ASCIIDOCTOR_BIBTEX_VERSION in the test harness"
kind: file
spec:
file: Dockerfile
instruction:
keyword: "ARG"
matcher: "asciidoctor_bibtex_version"
file: tests/asciidoctor.bats
matchPattern: '(?m:^ASCIIDOCTOR_BIBTEX_VERSION=.*)'
content: 'ASCIIDOCTOR_BIBTEX_VERSION={{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ requiredEnv .github.owner }}"
repository: "{{ requiredEnv .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateReadme:
name: "Update the key ASCIIDOCTOR_BIBTEX_VERSION in the README.adoc file"
kind: file
spec:
file: README.adoc
matchPattern: '(?m:^:ASCIIDOCTOR_BIBTEX_VERSION:.*)'
content: ':ASCIIDOCTOR_BIBTEX_VERSION: {{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
Expand Down
57 changes: 42 additions & 15 deletions updatecli/updatecli.d/asciidoctor-diagram.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Bump Asciidoctor-Diagram version"
sources:
getAsciidoctorDiagramVersion:
default:
kind: githubRelease
name: "Get the latest Asciidoctor-Diagram version"
spec:
Expand All @@ -22,14 +22,27 @@ conditions:
instruction:
keyword: "ARG"
matcher: "asciidoctor_diagram_version"
testVersionInReadme:
name: "Does the README.adoc have a variable ASCIIDOCTOR_DIAGRAM_VERSION"
kind: file
spec:
file: README.adoc
matchPattern: '(?m:^:ASCIIDOCTOR_DIAGRAM_VERSION:.*)'
testVersionInTestHarness:
name: "Does the test harness have variable ASCIIDOCTOR_DIAGRAM_VERSION"
kind: file
spec:
file: tests/asciidoctor.bats
matchPattern: '(?m:^ASCIIDOCTOR_DIAGRAM_VERSION=.*)'
targets:
updateHarnessEnvAsciidoctorDiagramVersion:
name: "Update the key ASCIIDOCTOR_DIAGRAM_VERSION in the test harness env_vars.yml file"
kind: yaml
sourceID: getAsciidoctorDiagramVersion
updateDockerfile:
name: "Update the value of ARG asciidoctor_diagram_version in the Dockerfile"
kind: dockerfile
spec:
file: "tests/env_vars.yml"
key: "ASCIIDOCTOR_DIAGRAM_VERSION"
file: Dockerfile
instruction:
keyword: "ARG"
matcher: "asciidoctor_diagram_version"
scm:
github:
user: "{{ .github.user }}"
Expand All @@ -39,15 +52,29 @@ targets:
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateDockerfileArgVersion:
name: "Update the value of ARG asciidoctor_diagram_version in the Dockerfile"
sourceID: getAsciidoctorDiagramVersion
kind: dockerfile
updateTestHarness:
name: "Update the key ASCIIDOCTOR_DIAGRAM_VERSION in the test harness"
kind: file
spec:
file: Dockerfile
instruction:
keyword: "ARG"
matcher: "asciidoctor_diagram_version"
file: tests/asciidoctor.bats
matchPattern: '(?m:^ASCIIDOCTOR_DIAGRAM_VERSION=.*)'
content: 'ASCIIDOCTOR_DIAGRAM_VERSION={{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ requiredEnv .github.owner }}"
repository: "{{ requiredEnv .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
updateReadme:
name: "Update the key ASCIIDOCTOR_DIAGRAM_VERSION in the README.adoc file"
kind: file
spec:
file: README.adoc
matchPattern: '(?m:^:ASCIIDOCTOR_DIAGRAM_VERSION:.*)'
content: ':ASCIIDOCTOR_DIAGRAM_VERSION: {{ source `default` }}'
scm:
github:
user: "{{ .github.user }}"
Expand Down
Loading

0 comments on commit 31c32ac

Please sign in to comment.