Skip to content

Fix 3.21 CI

Fix 3.21 CI #2965

Workflow file for this run

name: Pulp Compose
on:
schedule:
- cron: '15 3 * * *'
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/pulp_images.yml'
- 'images/**'
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
jobs:
compose:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
- uses: actions/setup-python@v4
- name: Install httpie and podman-compose
run: |
echo ::group::HTTPIE
sudo apt-get update -yq
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
echo ::endgroup::
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
pip install podman-compose
shell: bash
- name: Build
run: |
podman version
buildah version
buildah bud --file images/Containerfile.core.base --tag quay.io/pulp/base:3.21 .
buildah bud --pull=false --file images/pulp/stable/Containerfile.core --tag quay.io/pulp/pulp:3.21 .
buildah bud --pull=false --file images/pulp/stable/Containerfile.webserver --tag quay.io/pulp/pulp-web:3.21 .
podman images -a
- name: Compose up
run: |
cd images/compose
sed -i "s/pulp:latest/pulp:3.21/g" podman-compose.yml
sed -i "s/pulp-web:latest/pulp-web:3.21/g" podman-compose.yml
sudo usermod -G root $(whoami)
podman-compose up -d
sleep 30
for _ in $(seq 20)
do
sleep 3
if curl --fail http://localhost:8080/pulp/api/v3/status/ > /dev/null 2>&1
then
break
fi
done
curl --fail http://localhost:8080/pulp/api/v3/status/ | jq
shell: bash
- name: Test all components
run: |
git clone --depth=1 https://github.com/pulp/pulp_ansible.git
git clone --depth=1 https://github.com/pulp/pulp_container.git
.ci/scripts/pulp_tests.sh
shell: bash
env:
PY_COLORS: '1'
# These compose images are only pushed to quay & they use the same pulp/pulp repository that
# our latest s6 images use. On this branch our s6 images are tagged all-in-one on quay, see
# publish_images.yaml.
- name: Push images
if: github.event_name != 'pull_request'
env:
QUAY_BOT_PASSWORD: ${{ secrets.QUAY_BOT_PASSWORD }}
QUAY_BOT_USERNAME: ${{ secrets.QUAY_BOT_USERNAME }}
run: |
echo "$QUAY_BOT_PASSWORD" | podman login -u "$QUAY_BOT_USERNAME" --password-stdin quay.io
podman push quay.io/pulp/base:3.21
podman push quay.io/pulp/pulp:3.21
podman push quay.io/pulp/pulp-web:3.21
CURRENT_VERSION=$(podman run quay.io/pulp/pulp:3.21 bash -c 'pip3 show pulpcore | sed -n -e "s/Version: //p"')
echo $CURRENT_VERSION
podman tag quay.io/pulp/pulp:3.21 quay.io/pulp/pulp:$CURRENT_VERSION
podman tag quay.io/pulp/pulp-web:3.21 quay.io/pulp/pulp-web:$CURRENT_VERSION
podman push quay.io/pulp/pulp:$CURRENT_VERSION
podman push quay.io/pulp/pulp-web:$CURRENT_VERSION
echo "Pushed images pulp/base, pulp/pulp, & pulp/pulp-web with tags 3.21 & $CURRENT_VERSION"
- name: Logs
if: always()
run: |
podman ps -a
podman images -a
podman logs --tail=10000 compose_pulp_api_1
podman logs --tail=10000 compose_pulp_content_1
podman logs --tail=10000 compose_pulp_worker_1
podman logs --tail=10000 compose_pulp_worker_2
podman logs --tail=10000 compose_pulp_web_1
VOLUME_PATH=$(podman volume inspect pulpdev | jq -r .[].Mountpoint)
sudo ls -al $VOLUME_PATH
sudo tree $VOLUME_PATH
http --follow --timeout 30 --check-status --pretty format --print hb http://localhost:8080/pulp/api/v3/status/ || true
galaxy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
- uses: actions/setup-python@v4
- name: Install httpie and podman-compose
run: |
echo ::group::HTTPIE
sudo apt-get update -yq
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
echo ::endgroup::
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
pip install podman-compose
shell: bash
- name: Build
run: |
podman version
buildah version
buildah bud --file images/Containerfile.core.base --tag quay.io/pulp/base:3.21 .
buildah bud --pull=false --file images/galaxy/stable/Containerfile.core --tag quay.io/pulp/galaxy:4.6 .
buildah bud --pull=false --file images/galaxy/stable/Containerfile.webserver --tag quay.io/pulp/galaxy-web:4.6 .
podman images -a
- name: Compose up
run: |
cd images/compose
sed -i "s/pulp:latest/galaxy:4.6/g" podman-compose.yml
sed -i "s/pulp-web:latest/galaxy-web:4.6/g" podman-compose.yml
sudo usermod -G root $(whoami)
podman-compose up -d
sleep 30
for _ in $(seq 20)
do
sleep 3
if curl --fail http://localhost:8080/pulp/api/v3/status/ > /dev/null 2>&1
then
break
fi
done
curl --fail http://localhost:8080/pulp/api/v3/status/ | jq
shell: bash
- name: Test all components
run: |
.ci/scripts/galaxy_ng-tests.sh
shell: bash
env:
PY_COLORS: '1'
- name: Push images
if: github.event_name != 'pull_request'
env:
QUAY_BOT_PASSWORD: ${{ secrets.QUAY_BOT_PASSWORD }}
QUAY_BOT_USERNAME: ${{ secrets.QUAY_BOT_USERNAME }}
run: |
echo "$QUAY_BOT_PASSWORD" | podman login -u "$QUAY_BOT_USERNAME" --password-stdin quay.io
podman push quay.io/pulp/galaxy:4.6
podman push quay.io/pulp/galaxy-web:4.6
CURRENT_VERSION=$(podman run quay.io/pulp/galaxy:4.6 bash -c 'pip3 show galaxy_ng | sed -n -e "s/Version: //p"')
echo $CURRENT_VERSION
podman tag quay.io/pulp/galaxy:4.6 quay.io/pulp/galaxy:$CURRENT_VERSION
podman tag quay.io/pulp/galaxy-web:4.6 quay.io/pulp/galaxy-web:$CURRENT_VERSION
podman push quay.io/pulp/galaxy:$CURRENT_VERSION
podman push quay.io/pulp/galaxy-web:$CURRENT_VERSION
echo "Pushed images pulp/galaxy & pulp/galaxy-web with tags 4.6 & $CURRENT_VERSION"
- name: Logs
if: always()
run: |
podman ps -a
podman images -a
podman logs --tail=10000 compose_pulp_api_1
podman logs --tail=10000 compose_pulp_content_1
podman logs --tail=10000 compose_pulp_worker_1
podman logs --tail=10000 compose_pulp_worker_2
podman logs --tail=10000 compose_pulp_web_1
VOLUME_PATH=$(podman volume inspect pulpdev | jq -r .[].Mountpoint)
sudo ls -al $VOLUME_PATH
sudo tree $VOLUME_PATH
http --follow --timeout 30 --check-status --pretty format --print hb http://localhost:8080/pulp/api/v3/status/ || true