Woodpecker CI: Work around script entrypoint truncation
This commit is contained in:
parent
da9cbc8e2f
commit
47e6dbfade
6 changed files with 56 additions and 0 deletions
|
|
@ -1,9 +1,16 @@
|
|||
when:
|
||||
- event: pull_request
|
||||
|
||||
variables:
|
||||
script_file_entrypoint: &script_file_entrypoint
|
||||
- /bin/sh
|
||||
- -c
|
||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
||||
|
||||
steps:
|
||||
check-changelog:
|
||||
image: docker.io/alpine:3.23
|
||||
entrypoint: *script_file_entrypoint
|
||||
commands:
|
||||
- apk add --no-cache git
|
||||
- sh ./tools/check-changelog
|
||||
|
|
|
|||
|
|
@ -5,10 +5,17 @@ when:
|
|||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
path: [ "*.ex", "*.eex", "*.exs", "mix.lock", ".woodpecker/**" ]
|
||||
|
||||
variables:
|
||||
script_file_entrypoint: &script_file_entrypoint
|
||||
- /bin/sh
|
||||
- -c
|
||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
||||
|
||||
steps:
|
||||
mix-format:
|
||||
image: &elixir-image
|
||||
docker.io/elixir:1.15-alpine
|
||||
entrypoint: *script_file_entrypoint
|
||||
failure: ignore
|
||||
commands:
|
||||
- |
|
||||
|
|
@ -19,6 +26,7 @@ steps:
|
|||
|
||||
credo:
|
||||
image: *elixir-image
|
||||
entrypoint: *script_file_entrypoint
|
||||
failure: ignore
|
||||
environment:
|
||||
MIX_ENV: test
|
||||
|
|
@ -55,6 +63,7 @@ steps:
|
|||
|
||||
ensure-status:
|
||||
image: *elixir-image
|
||||
entrypoint: *script_file_entrypoint
|
||||
commands: |
|
||||
if test -f fail.stamp; then
|
||||
echo "One or more previous steps fails. Failing workflow..."
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ labels:
|
|||
platform: ${platform}
|
||||
|
||||
variables:
|
||||
script_file_entrypoint: &script_file_entrypoint
|
||||
- /bin/sh
|
||||
- -c
|
||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
||||
build_cmds: &build_cmds
|
||||
- apk add git build-base cmake file-dev openssl vips-dev zip
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
|
|
@ -44,6 +48,7 @@ variables:
|
|||
steps:
|
||||
otp-develop-amd64-musl:
|
||||
image: *build_image_amd64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/amd64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
||||
environment: *env
|
||||
|
|
@ -53,6 +58,7 @@ steps:
|
|||
|
||||
otp-stable-amd64-musl:
|
||||
image: *build_image_amd64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
||||
environment: *env
|
||||
|
|
@ -61,6 +67,7 @@ steps:
|
|||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
||||
otp-stable-tag-amd64-musl:
|
||||
image: *build_image_amd64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
||||
environment: *env
|
||||
|
|
@ -70,6 +77,7 @@ steps:
|
|||
|
||||
otp-develop-arm-musl:
|
||||
image: *build_image_arm
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
||||
environment: *env
|
||||
|
|
@ -79,6 +87,7 @@ steps:
|
|||
|
||||
otp-stable-arm-musl:
|
||||
image: *build_image_arm
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
||||
environment: *env
|
||||
|
|
@ -87,6 +96,7 @@ steps:
|
|||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
||||
otp-stable-tag-arm-musl:
|
||||
image: *build_image_arm
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
||||
environment: *env
|
||||
|
|
@ -96,6 +106,7 @@ steps:
|
|||
|
||||
otp-develop-arm64-musl:
|
||||
image: *build_image_arm64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
||||
environment: *env
|
||||
|
|
@ -105,6 +116,7 @@ steps:
|
|||
|
||||
otp-stable-arm64-musl:
|
||||
image: *build_image_arm64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
||||
environment: *env
|
||||
|
|
@ -113,6 +125,7 @@ steps:
|
|||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
||||
otp-stable-tag-arm64-musl:
|
||||
image: *build_image_arm64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
||||
environment: *env
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ labels:
|
|||
platform: ${platform}
|
||||
|
||||
variables:
|
||||
script_file_entrypoint: &script_file_entrypoint
|
||||
- /bin/sh
|
||||
- -c
|
||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
||||
build_cmds: &build_cmds
|
||||
- apt-get update && apt-get install -y cmake libmagic-dev libvips-dev erlang-dev git build-essential zip
|
||||
- echo "import Config" > config/prod.secret.exs
|
||||
|
|
@ -45,6 +49,7 @@ variables:
|
|||
steps:
|
||||
otp-develop-amd64:
|
||||
image: *build_image_amd64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/amd64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
||||
environment: *env
|
||||
|
|
@ -54,6 +59,7 @@ steps:
|
|||
|
||||
otp-stable-amd64:
|
||||
image: *build_image_amd64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
||||
environment: *env
|
||||
|
|
@ -62,6 +68,7 @@ steps:
|
|||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
||||
otp-stable-tag-amd64:
|
||||
image: *build_image_amd64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
||||
environment: *env
|
||||
|
|
@ -71,6 +78,7 @@ steps:
|
|||
|
||||
otp-develop-arm:
|
||||
image: *build_image_arm
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
||||
environment: *env
|
||||
|
|
@ -80,6 +88,7 @@ steps:
|
|||
|
||||
otp-stable-arm:
|
||||
image: *build_image_arm
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
||||
environment: *env
|
||||
|
|
@ -88,6 +97,7 @@ steps:
|
|||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
||||
otp-stable-tag-arm:
|
||||
image: *build_image_arm
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
||||
environment: *env
|
||||
|
|
@ -97,6 +107,7 @@ steps:
|
|||
|
||||
otp-develop-arm64:
|
||||
image: *build_image_arm64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
||||
environment: *env
|
||||
|
|
@ -106,6 +117,7 @@ steps:
|
|||
|
||||
otp-stable-arm64:
|
||||
image: *build_image_arm64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
||||
environment: *env
|
||||
|
|
@ -114,6 +126,7 @@ steps:
|
|||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
||||
otp-stable-tag-arm64:
|
||||
image: *build_image_arm64
|
||||
entrypoint: *script_file_entrypoint
|
||||
when:
|
||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
||||
environment: *env
|
||||
|
|
|
|||
|
|
@ -8,9 +8,16 @@ when:
|
|||
depends_on:
|
||||
- lint
|
||||
|
||||
variables:
|
||||
script_file_entrypoint: &script_file_entrypoint
|
||||
- /bin/sh
|
||||
- -c
|
||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
||||
|
||||
steps:
|
||||
unit-testing-elixir-1.15:
|
||||
image: elixir:1.15-alpine
|
||||
entrypoint: *script_file_entrypoint
|
||||
environment:
|
||||
MIX_ENV: test
|
||||
DB_HOST: postgres
|
||||
|
|
|
|||
|
|
@ -8,9 +8,16 @@ when:
|
|||
depends_on:
|
||||
- lint
|
||||
|
||||
variables:
|
||||
script_file_entrypoint: &script_file_entrypoint
|
||||
- /bin/sh
|
||||
- -c
|
||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
||||
|
||||
steps:
|
||||
unit-testing-elixir-1.18:
|
||||
image: elixir:1.18-otp-27-alpine
|
||||
entrypoint: *script_file_entrypoint
|
||||
environment:
|
||||
MIX_ENV: test
|
||||
DB_HOST: postgres
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue