Skip to content

Commit

Permalink
Streamline s6 image CI
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
gerrod3 committed Oct 8, 2024
1 parent 428a7dd commit 46b6615
Showing 1 changed file with 20 additions and 43 deletions.
63 changes: 20 additions & 43 deletions .github/workflows/pr_build_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,49 +43,23 @@ jobs:
fail-fast: false
matrix:
include:
- ci_type: pulp_ci_centos
ci_image: pulp-ci-centos
test_type: pulp_galaxy_ng
test_image: pulp-galaxy-ng
- ci_type: pulp_ci_centos
ci_image: pulp-ci-centos
test_type: pulp
test_image: pulp
- test_image: pulp-galaxy-ng
tag: "4.6"
- test_image: pulp
tag: "3.21"
- test_image: pulp-galaxy-ng
tag: "4.6-https"
- test_image: pulp
tag: "3.21-https"
steps:
- uses: actions/checkout@v2
- name: Build the images
- uses: actions/checkout@v4
- name: Set https build args
if: contains(fromJSON('["4.6-https", "3.21-https"]'), matrix.tag)
run: |
wget https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-x86_64.tar.xz
wget https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-noarch.tar.xz
wget https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-symlinks-arch.tar.xz
wget https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-symlinks-noarch.tar.xz
unxz s6-overlay*.tar.xz
gzip s6-overlay*.tar
docker build --file s6_images/${{ matrix.ci_type }}/Containerfile --tag pulp/${{ matrix.ci_image }}:latest .
docker build --file s6_images/${{ matrix.test_type }}/Containerfile --tag pulp/${{ matrix.test_image }}:latest .
- name: Test the images
run: s6_images/assets/test.sh "pulp/${{ matrix.test_image }}:latest"
- name: Display log on error
if: failure()
run: docker logs pulp
echo "BUILD_ARG1='--build-arg SCHEME=https'" >> $GITHUB_ENV
echo "BUILD_ARG2='--build-arg FROM_TAG=${{ matrix.tag }}'" >> $GITHUB_ENV
echo "TEST_ARG=https" >> $GITHUB_ENV
sslbuild:
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
include:
- ci_type: pulp_ci_centos
ci_image: pulp-ci-centos
test_type: pulp_galaxy_ng
test_image: pulp-galaxy-ng
- ci_type: pulp_ci_centos
ci_image: pulp-ci-centos
test_type: pulp
test_image: pulp
steps:
- uses: actions/checkout@v2
- name: Build the images
run: |
wget https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-x86_64.tar.xz
Expand All @@ -94,10 +68,13 @@ jobs:
wget https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-symlinks-noarch.tar.xz
unxz s6-overlay*.tar.xz
gzip s6-overlay*.tar
docker build --build-arg SCHEME="https" --file s6_images/${{ matrix.ci_type }}/Containerfile --tag pulp/${{ matrix.ci_image }}:https .
docker build --build-arg FROM_TAG="https" --file s6_images/${{ matrix.test_type }}/Containerfile --tag pulp/${{ matrix.test_image }}:https .
LOCATION="${{ matrix.test_image }}"
docker build --file s6_images/pulp_ci_centos/Containerfile --tag pulp/pulp-ci-centos:${{ matrix.tag }} . ${{ env.BUILD_ARG1 }}
docker build --file "s6_images/${LOCATION//-/_}/Containerfile" --tag pulp/${{ matrix.test_image }}:${{ matrix.tag }} . ${{ env.BUILD_ARG2 }}
- name: Test the images
run: s6_images/assets/test.sh "pulp/${{ matrix.test_image }}:https" https
run: s6_images/assets/test.sh "pulp/${{ matrix.test_image }}:${{ matrix.tag }}" $TEST_ARG

- name: Display log on error
if: failure()
run: docker logs pulp

0 comments on commit 46b6615

Please sign in to comment.