Fix 3.21 CI #2961
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
matrix: | |
include: | |
- image_tag: latest | |
- image_tag: stable | |
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 | |
- name: Set up Python 3.9 | |
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 | |
echo "IMAGE_TAG=${{ matrix.image_tag }}" >> $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:latest . | |
buildah bud --pull=false --file images/pulp/${{ matrix.image_tag }}/Containerfile.core --tag quay.io/pulp/pulp:${{ matrix.image_tag }} . | |
buildah bud --pull=false --file images/pulp/${{ matrix.image_tag }}/Containerfile.webserver --tag quay.io/pulp/pulp-web:${{ matrix.image_tag }} . | |
podman images -a | |
- name: Compose up | |
run: | | |
cd images/compose | |
sed -i "s/pulp:latest/pulp:${{ matrix.image_tag }}/g" podman-compose.yml | |
sed -i "s/pulp-web:latest/pulp-web:${{ matrix.image_tag }}/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' | |
- 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:latest | |
podman push quay.io/pulp/pulp:${{ matrix.image_tag }} | |
podman push quay.io/pulp/pulp-web:${{ matrix.image_tag }} | |
if [[ "$IMAGE_TAG" == "stable" ]]; then | |
CURRENT_VERSION=$(podman run quay.io/pulp/pulp:stable bash -c 'pip3 show pulpcore | sed -n -e "s/Version: //p"') | |
echo $CURRENT_VERSION | |
podman tag quay.io/pulp/pulp:${{ matrix.image_tag }} quay.io/pulp/pulp:$CURRENT_VERSION | |
podman tag quay.io/pulp/pulp-web:${{ matrix.image_tag }} quay.io/pulp/pulp-web:$CURRENT_VERSION | |
podman push quay.io/pulp/pulp:$CURRENT_VERSION | |
podman push quay.io/pulp/pulp-web:$CURRENT_VERSION | |
fi | |
echo $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 | |
matrix: | |
include: | |
- image_tag: latest | |
- image_tag: stable | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# by default, it uses a depth of 1 | |
# this fetches all history so that we can read each commit | |
fetch-depth: 0 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.8' | |
- 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 | |
echo "IMAGE_TAG=${{ matrix.image_tag }}" >> $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:latest . | |
buildah bud --pull=false --file images/galaxy/${{ matrix.image_tag }}/Containerfile.core --tag quay.io/pulp/galaxy:${{ matrix.image_tag }} . | |
buildah bud --pull=false --file images/galaxy/${{ matrix.image_tag }}/Containerfile.webserver --tag quay.io/pulp/galaxy-web:${{ matrix.image_tag }} . | |
podman images -a | |
- name: Compose up | |
run: | | |
cd images/compose | |
sed -i "s/pulp:latest/galaxy:${{ matrix.image_tag }}/g" podman-compose.yml | |
sed -i "s/pulp-web:latest/galaxy-web:${{ matrix.image_tag }}/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/base:latest | |
podman push quay.io/pulp/galaxy:${{ matrix.image_tag }} | |
podman push quay.io/pulp/galaxy-web:${{ matrix.image_tag }} | |
if [[ "$IMAGE_TAG" == "stable" ]]; then | |
CURRENT_VERSION=$(podman run quay.io/pulp/galaxy:stable bash -c 'pip3 show galaxy_ng | sed -n -e "s/Version: //p"') | |
echo $CURRENT_VERSION | |
podman tag quay.io/pulp/galaxy:${{ matrix.image_tag }} quay.io/pulp/galaxy:$CURRENT_VERSION | |
podman tag quay.io/pulp/galaxy-web:${{ matrix.image_tag }} quay.io/pulp/galaxy-web:$CURRENT_VERSION | |
podman push quay.io/pulp/galaxy:$CURRENT_VERSION | |
podman push quay.io/pulp/galaxy-web:$CURRENT_VERSION | |
fi | |
- 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 |