Skip to content

Commit

Permalink
chore(ci): workaround re: #102
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed May 3, 2023
1 parent b83b2cd commit 99d62bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,23 @@ STANDALONE_INSTALL_TASK_TEMPLATE: &STANDALONE_INSTALL_TASK_TEMPLATE
&& ls pact/bin/ \
&& ls /usr/local/bin
TEST_TASK_TEMPLATE: &TEST_TASK_TEMPLATE
## This is a yak shave relating to https://github.com/pact-foundation/pact-ruby-standalone/issues/102
## pact-plugin-cli is not compatible with current guidance for alpine aarch64 with official arm64v8/alpine
## This task is reused in TEST_TASK_TEMPLATE adding in the pact-plugin-cli so its tested for other combos
TEST_ALPINE_ARM64_TASK_TEMPLATE: &TEST_ALPINE_ARM64_TASK_TEMPLATE
test_script: | # would rather avoid the commands here, but also want to keep the images clean so they can be easily used by users
uname -a
pact-broker --help
pact-message --help
pact-mock-service --help
pact-plugin-cli --help
pact-provider-verifier --help
pact-stub-service --help
pactflow --help
TEST_TASK_TEMPLATE: &TEST_TASK_TEMPLATE
<<: *TEST_ALPINE_ARM64_TASK_TEMPLATE
test_plugin_cli_script: pact-plugin-cli

DOCKER_ARGS_ARM64_TEMPLATE: &DOCKER_ARGS_ARM64_TEMPLATE
docker_arguments:
PACT_VERSION: $PACT_VERSION
Expand Down Expand Up @@ -133,7 +139,7 @@ alpine_arm64_task:
arm_container:
dockerfile: Dockerfile.alpine.arm64
<<: *DOCKER_ARGS_ARM64_TEMPLATE
<<: *TEST_TASK_TEMPLATE
<<: *TEST_ALPINE_ARM64_TASK_TEMPLATE
ubuntu_arm64_task:
arm_container:
dockerfile: Dockerfile.ubuntu
Expand All @@ -144,7 +150,6 @@ debian_arm64_task:
dockerfile: Dockerfile.debian.slim
<<: *DOCKER_ARGS_ARM64_TEMPLATE
<<: *TEST_TASK_TEMPLATE

## Test published standalone against x64 versions
alpine_x64_task:
container:
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile.alpine.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ ARG TARGET_ARCH
ARG PACT_VERSION
ARG TARGET_ARCH=${TARGET_ARCH:-arm64}
ARG PACT_VERSION=${PACT_VERSION:-2.0.0}
ENV GLIBC_VERSION=2.35-r0

RUN apk --no-cache add gcompat libc6-compat bash libgcc libstdc++ \
&& wget -O /etc/apk/keys/sgerrand.rsa.pub -q https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \
&& apk --no-cache --force-overwrite add glibc-${GLIBC_VERSION}.apk

RUN apk --no-cache add gcompat libc6-compat bash
RUN wget -q https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v${PACT_VERSION}/pact-${PACT_VERSION}-linux-${TARGET_ARCH}.tar.gz \
&& tar xzf pact-${PACT_VERSION}-linux-${TARGET_ARCH}.tar.gz \
&& rm -rf pact-${PACT_VERSION}-linux-${TARGET_ARCH}.tar.gz \
Expand Down

0 comments on commit 99d62bd

Please sign in to comment.