diff options
author | Julien Dessaux | 2022-09-14 00:04:30 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-09-14 00:04:30 +0200 |
commit | 4bf865ba1b7cbfb32340d0f956ac0bcb29e60d40 (patch) | |
tree | 63b396347c10e805b7e6adfb3cae8c3e3c1c0509 | |
parent | Added a buildah login step to the www-build job (diff) | |
download | ev-scripts-4bf865ba1b7cbfb32340d0f956ac0bcb29e60d40.tar.gz ev-scripts-4bf865ba1b7cbfb32340d0f956ac0bcb29e60d40.tar.bz2 ev-scripts-4bf865ba1b7cbfb32340d0f956ac0bcb29e60d40.zip |
Use the EVENTLINE_JOB_NAME environment variable instead of reinventing the wheel
Diffstat (limited to '')
-rw-r--r-- | common/clean.sh | 4 | ||||
-rw-r--r-- | common/git-clone.sh | 5 | ||||
-rw-r--r-- | common/make.sh | 5 | ||||
-rw-r--r-- | eventline/ev-scripts-deploy.yaml | 4 | ||||
-rwxr-xr-x | www/build-images.sh | 4 | ||||
-rw-r--r-- | www/www-build.yaml | 6 |
6 files changed, 6 insertions, 22 deletions
diff --git a/common/clean.sh b/common/clean.sh index 1ce9e66..207bd78 100644 --- a/common/clean.sh +++ b/common/clean.sh @@ -1,6 +1,4 @@ #!/usr/bin/env bash set -euo pipefail -NAME=$1 - -rm -rf "/tmp/${NAME}" +rm -rf "/tmp/${EVENTLINE_JOB_NAME}" diff --git a/common/git-clone.sh b/common/git-clone.sh index d502aca..71f503c 100644 --- a/common/git-clone.sh +++ b/common/git-clone.sh @@ -1,10 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -NAME=$1 -URL=$2 +URL=$1 -WORKDIR="/tmp/${NAME}" +WORKDIR="/tmp/${EVENTLINE_JOB_NAME}" cleanup() { rm -rf "${WORKDIR}" diff --git a/common/make.sh b/common/make.sh index f103167..ea2f53c 100644 --- a/common/make.sh +++ b/common/make.sh @@ -1,10 +1,9 @@ #!/usr/bin/env bash set -euo pipefail -NAME=$1 -TARGET=$2 +TARGET=$1 -WORKDIR="/tmp/${NAME}" +WORKDIR="/tmp/${EVENTLINE_JOB_NAME}" cleanup() { rm -rf "${WORKDIR}" diff --git a/eventline/ev-scripts-deploy.yaml b/eventline/ev-scripts-deploy.yaml index 2471747..cfb961b 100644 --- a/eventline/ev-scripts-deploy.yaml +++ b/eventline/ev-scripts-deploy.yaml @@ -4,18 +4,14 @@ steps: script: path: "../common/git-clone.sh" arguments: - - "ev-scripts-deploy" - "https://git.adyxax.org/adyxax/ev-scripts" - label: make run script: path: "../common/make.sh" arguments: - - "ev-scripts-deploy" - "run" - label: clean script: path: "../common/clean.sh" - arguments: - - "ev-scripts-deploy" identities: - eventline-self diff --git a/www/build-images.sh b/www/build-images.sh index 632cd3e..d306572 100755 --- a/www/build-images.sh +++ b/www/build-images.sh @@ -1,9 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -NAME=$1 - -WORKDIR="/tmp/${NAME}" +WORKDIR="/tmp/${EVENTLINE_JOB_NAME}" cleanup() { rm -rf "${WORKDIR}" diff --git a/www/www-build.yaml b/www/www-build.yaml index f2a4dcb..b763e54 100644 --- a/www/www-build.yaml +++ b/www/www-build.yaml @@ -7,24 +7,18 @@ steps: script: path: "../common/git-clone.sh" arguments: - - "www-build" - "https://git.adyxax.org/adyxax/www" - label: build images script: path: "build-images.sh" - arguments: - - "www-build" - label: make push script: path: "../common/make.sh" arguments: - - "www-build" - "push" - label: clean script: path: "../common/clean.sh" - arguments: - - "www-build" identities: - quay-io runner: |