Skip to content

Commit

Permalink
Drop tests that are failing
Browse files Browse the repository at this point in the history
Alpine doesn't keep their archs in sync and only keeps around the latest
revision in edge, which breaks a bunch of our test, so I've cut down the
alpine tests to a single arch.

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
  • Loading branch information
jonjohnsonjr committed Nov 22, 2024
1 parent 19462e0 commit b4524de
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 57 deletions.
49 changes: 9 additions & 40 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [x86_64, "386", armv7, aarch64, riscv64, s390x, ppc64le]
arch: [x86_64, aarch64]

steps:
- uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
Expand Down Expand Up @@ -47,38 +47,7 @@ jobs:
echo ::group::sbom.json
cat $f
echo ::endgroup::
docker run --rm -v $(pwd)/$f:/sbom.json cgr.dev/chainguard/ntia-conformance-checker -v --file /sbom.json
done
# Build a multi-arch nginx image for all archs.
build-nginx-multiarch:
name: build-nginx-multiarch
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v2.1.5
with:
go-version-file: 'go.mod'
check-latest: true
- run: |
make apko
./apko build ./examples/nginx.yaml nginx:build /tmp/nginx.tar --arch x86_64,386,armv7,aarch64,s390x,ppc64le
- name: Check SBOM Conformance
run: |
set -euxo pipefail
for f in *.spdx.json; do
echo ::group::sbom.json
cat $f
echo ::endgroup::
docker run --rm -v $(pwd)/$f:/sbom.json cgr.dev/chainguard/ntia-conformance-checker -v --file /sbom.json
docker run --rm -v $(pwd)/$f:/$f --entrypoint "sh" cgr.dev/chainguard/wolfi-base -c "apk add spdx-tools-java && tools-java Verify /$f
done
build-all-examples-one-arch:
Expand Down Expand Up @@ -116,7 +85,7 @@ jobs:
fi
done
build-alpine-source-date-epoch:
build-wolfi-source-date-epoch:
name: source-date-epoch
runs-on: ubuntu-latest

Expand All @@ -141,11 +110,11 @@ jobs:
SOURCE_DATE_EPOCH: "0"
run: |
make apko
FIRST=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine --arch x86_64,386,armv7,aarch64,s390x,ppc64le 2> /dev/null)
FIRST=$(./apko publish ./examples/wolfi-base.yaml localhost:5000/wolfi --arch x86_64,aarch64 2> /dev/null)
for idx in {2..10}
do
NEXT=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine --arch x86_64,386,armv7,aarch64,s390x,ppc64le 2> /dev/null)
NEXT=$(./apko publish ./examples/wolfi-base.yaml localhost:5000/wolfi --arch x86_64,aarch64 2> /dev/null)
if [ "${FIRST}" = "${NEXT}" ]; then
echo "Build ${idx} matches."
Expand All @@ -155,7 +124,7 @@ jobs:
fi
done
build-alpine-build-date-epoch:
build-wolfi-build-date-epoch:
name: build-date-epoch
runs-on: ubuntu-latest

Expand All @@ -180,11 +149,11 @@ jobs:
make apko
# Without SOURCE_DATE_EPOCH set, the timestamp of the image will be computed to be
# the maximum build date of the resolved APKs.
FIRST=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine --arch x86_64,386,armv7,aarch64,s390x,ppc64le 2> /dev/null)
FIRST=$(./apko publish ./examples/wolfi-base.yaml localhost:5000/wolfi --arch x86_64,aarch64 2> /dev/null)
for idx in {2..10}
do
NEXT=$(./apko publish ./examples/alpine-base.yaml localhost:5000/alpine --arch x86_64,386,armv7,aarch64,s390x,ppc64le 2> /dev/null)
NEXT=$(./apko publish ./examples/wolfi-base.yaml localhost:5000/wolfi --arch x86_64,aarch64 2> /dev/null)
if [ "${FIRST}" = "${NEXT}" ]; then
echo "Build ${idx} matches."
Expand Down Expand Up @@ -218,7 +187,7 @@ jobs:
make apko
# Build image with annotations.
ref=$(./apko publish ./examples/nginx.yaml localhost:5000/nginx --arch x86_64,386,armv7,aarch64,s390x,ppc64le)
ref=$(./apko publish ./examples/nginx.yaml localhost:5000/nginx --arch x86_64,aarch64)
# Check index annotations.
crane manifest $ref | jq -r '.annotations.foo' | grep bar
Expand Down
5 changes: 4 additions & 1 deletion examples/alias-only.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
packages:
- openssh-client
- openssh-client

archs:
- x86_64
11 changes: 0 additions & 11 deletions examples/alpine-386_amd64.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions examples/alpine-base-rootless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ cmd: /bin/sh -l
# optional environment configuration
environment:
PATH: /usr/sbin:/sbin:/usr/bin:/bin

archs:
- amd64
3 changes: 3 additions & 0 deletions examples/alpine-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ cmd: /bin/sh -l
# optional environment configuration
environment:
PATH: /usr/sbin:/sbin:/usr/bin:/bin

archs:
- amd64
3 changes: 3 additions & 0 deletions examples/alpine-python3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ cmd: /bin/sh -l
# optional environment configuration
environment:
PATH: /usr/sbin:/sbin:/usr/bin:/bin

archs:
- amd64
3 changes: 3 additions & 0 deletions examples/alpine-slim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ environment:
PATH: /usr/sbin:/sbin:/usr/bin:/bin

cmd: /bin/sh -l

archs:
- amd64
3 changes: 3 additions & 0 deletions examples/apko-devenv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ contents:
- docker-cli
entrypoint:
command: /bin/sh -l

archs:
- amd64
3 changes: 3 additions & 0 deletions examples/nginx-rootless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ paths:
uid: 10000
gid: 10000
permissions: 0o644

archs:
- amd64
11 changes: 8 additions & 3 deletions examples/nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://packages.wolfi.dev/os
packages:
- alpine-baselayout
- wolfi-baselayout
- nginx

entrypoint:
Expand Down Expand Up @@ -32,7 +34,7 @@ paths:
permissions: 0o755
- path: /etc/nginx/http.d/default.conf
type: hardlink
source: /usr/share/nginx/http-default_server.conf
source: /etc/nginx/nginx.conf.default
uid: 10000
gid: 10000
permissions: 0o644
Expand All @@ -41,3 +43,6 @@ work-dir: /usr/share/nginx

annotations:
foo: bar

archs:
- amd64
2 changes: 1 addition & 1 deletion hack/ci/00-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ REF="apko.local/ci-testing:test"

trap "rm -f ${OUTPUT_TAR}" EXIT

for f in examples/alpine-base-rootless.yaml examples/wolfi-base.yaml; do
for f in examples/wolfi-base.yaml; do
echo "=== building $f"

REF="apko.local/ci-testing:$(basename ${f})"
Expand Down
2 changes: 1 addition & 1 deletion hack/ci/01-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ docker rm -f "${REGISTRY_CONTAINER_NAME}"
docker run --name "${REGISTRY_CONTAINER_NAME}" \
-d -p ${PORT}:5000 "${REGISTRY_BASE_IMAGE}"

for f in examples/alpine-base-rootless.yaml examples/wolfi-base.yaml; do
for f in examples/wolfi-base.yaml; do
echo "=== building $f"

REF="localhost:${PORT}/ci-testing:$(basename ${f})"
Expand Down

0 comments on commit b4524de

Please sign in to comment.