Skip to content

Nightly CI

Nightly CI #93

Workflow file for this run

name: Nightly CI
on:
schedule:
- cron: '30 5 * * *'
workflow_dispatch:
inputs: {}
jobs:
unit:
if: github.repository == 'quay/quay'
name: Run all Test
runs-on: ubuntu-20.04
env:
ZVSI_FP_NAME: quay-floating-ci
ZVSI_INSTANCE_NAME: quay-zvsi-ci
ZVSI_VPC: r018-b72c601c-c1d9-42cf-af66-c0f6da4ab982
ZVSI_ZONE_NAME: eu-gb-3
ZVSI_PROFILE_NAME: bz2-4x16
ZVSI_SUBNET: 07a7-8ea5eb5d-d432-47fd-a90c-153ebcb6c2cb
ZVSI_IMAGE: r018-000c8ed2-fb20-436a-9b3a-8b4f062b50d2
ZVSI_KEY: r018-ee997015-b88c-4500-874c-71f2175a8284
ZVSI_RG_ID: 2e818eb391df4774977812b50ff0e8c9
strategy:
fail-fast: false
matrix:
platform: ['amd64','ppc64le','s390x']
steps:
- name: install ibmcli and setup ibm login
if: ${{ matrix.platform == 's390x' }}
run: |
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
ibmcloud login -q --apikey ${{ secrets.IBMCLOUD_API_KEY }} -r eu-gb
ibmcloud plugin install vpc-infrastructure
- name: Creation of ZVSI
if: ${{ matrix.platform == 's390x' }}
id: ZVSI
run: |
#creation of zvsi
ibmcloud is instance-create $ZVSI_INSTANCE_NAME $ZVSI_VPC $ZVSI_ZONE_NAME $ZVSI_PROFILE_NAME $ZVSI_SUBNET --image $ZVSI_IMAGE --keys $ZVSI_KEY --resource-group-id $ZVSI_RG_ID
#Reserving a floating ip to the ZVSI
ibmcloud is floating-ip-reserve $ZVSI_FP_NAME --zone $ZVSI_ZONE_NAME --resource-group-id $ZVSI_RG_ID --in $ZVSI_INSTANCE_NAME
#Bouding the Floating ip to the ZVSI
ibmcloud is floating-ip-update $ZVSI_FP_NAME --nic primary --in $ZVSI_INSTANCE_NAME
sleep 60
#Saving the Floating IP to login ZVSI
ZVSI_HOST=$(ibmcloud is floating-ip $ZVSI_FP_NAME | awk '/Address/{print $2}')
echo $ZVSI_HOST
echo "IP=${ZVSI_HOST}" >> $GITHUB_OUTPUT
- name: Status of ZVSI
if: ${{ matrix.platform == 's390x' }}
run: |
check=$(ibmcloud is ins| awk '/'$ZVSI_INSTANCE_NAME'/{print $3}')
while [[ $check != "running" ]]
do
check=$(ibmcloud is ins | awk '/'$ZVSI_INSTANCE_NAME'/{print $3}')
if [[ $check == 'failed' ]]
then
echo "Failed to run the ZVSI"
break
fi
done
- name: Install dependencies and run tests on amd64
if: matrix.platform == 'amd64'
run: >-
docker run
--rm
-w /
-e GH_REPOSITORY
-e GH_REF
ubuntu:20.04
/bin/bash -ec '
export DEBIAN_FRONTEND=noninteractive;
apt-get -y update;
apt-get -y install libgpgme-dev libldap2-dev libsasl2-dev swig python3.9-dev python3-pip findutils git;
apt-get -y install libffi-dev libssl-dev libjpeg-dev libpq-dev libxml2-dev libxslt-dev;
apt-get -y install rustc cargo pkg-config;
git clone ${GH_REPOSITORY} build;
cd build && git checkout ${GH_REF};
cat requirements-dev.txt | grep tox | xargs pip install;
tox -e py39-unit;
tox -e py39-e2e;
tox -e py39-registry;'
env:
GH_REPOSITORY: ${{ github.server_url }}/${{ github.repository }}
GH_REF: ${{ github.ref }}
- name: Install dependencies and run all tests on ${{ matrix.platform }}
if: matrix.platform != 'amd64'
uses: appleboy/ssh-action@v0.1.10
env:
GH_REPOSITORY: ${{ github.server_url }}/${{ github.repository }}
GH_REF: ${{ github.ref }}
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL: 1
with:
host: ${{ matrix.platform == 's390x' && steps.ZVSI.outputs.IP || secrets.BUILDER_PPC64LE_SSH_HOST_UBUNTU}}
username: ${{ matrix.platform == 's390x' && secrets.ZVSI_SSH_USER || secrets.BUILDER_PPC64LE_SSH_USER }}
key: ${{ matrix.platform == 's390x' && secrets.ZVSI_PR_KEY || secrets.BUILDER_PPC64LE_SSH_KEY}}
envs: GH_REPOSITORY,GH_REF,GRPC_PYTHON_BUILD_SYSTEM_OPENSSL
command_timeout: 100m
script: |
apt-get update -y
apt-get -y install build-essential libgpgme-dev libldap2-dev libsasl2-dev swig python3.9-dev python3-pip findutils git
apt-get -y install libffi-dev libssl-dev libjpeg-dev libpq-dev libxml2-dev libxslt-dev
apt-get -y install rustc cargo pkg-config
rm -rf build
git clone ${GH_REPOSITORY} build
cd build && git checkout ${GH_REF}
cat requirements-dev.txt | grep tox | xargs python3 -m pip -qq install
if [[ 's390x' == $(uname -m) ]]; then
GRPC_LATEST=$(grep "grpcio" requirements.txt |cut -d "=" -f 3)
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 && python3 -m pip install -qq grpcio==${GRPC_LATEST}
fi
#Unit
tox -e py39-unit
#e2e
tox -e py39-e2e
#registry
tox -e py39-registry
- name: Cleanup ZVSI
if: ${{ steps.ZVSI.conclusion == 'success' && always() }}
run: |
#Delete the created ZVSI
ibmcloud is instance-delete $ZVSI_INSTANCE_NAME --force
sleep 20
#Release the created FP
ibmcloud is floating-ip-release $ZVSI_FP_NAME --force