bump NF Compose version to 2.2.14 #81
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: Production Build | |
on: | |
push: | |
# Publish semver tags as releases. | |
tags: [ '*.*.*' ] | |
jobs: | |
consumer-gateway: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Build consumer_gateway | |
run: | | |
ls -la | |
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh) | |
cd consumer_gateway | |
ARGS='--no-cache' exec bash build_production.sh | |
- name: Push consumer_gateway | |
run: | | |
ls -la | |
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh) | |
cd consumer_gateway | |
ARGS='--no-cache' exec bash push_production.sh | |
skipper-proxy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Build skipper_proxy | |
run: | | |
ls -la | |
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh) | |
cd skipper_proxy | |
ARGS='--no-cache' exec bash build_production.sh | |
- name: Push skipper_proxy | |
run: | | |
ls -la | |
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh) | |
cd skipper_proxy | |
ARGS='--no-cache' exec bash push_production.sh | |
skipper: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print environment variables | |
run: | | |
printenv | |
# build this here (without pushing, so the integration tests work) | |
- name: Build skipper_proxy | |
run: | | |
ls -la | |
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh) | |
cd skipper_proxy | |
ARGS='--no-cache' exec bash build_production.sh | |
- name: Setup Devenv | |
run: | | |
bash setup_devenv.sh | |
- name: "Run Setup for CI" | |
run: | | |
cd skipper | |
exec python3 build.py setup | |
- name: "Build Skipper" | |
run: | | |
echo "will build version $(bash version.sh)" | |
export SKIPPER_DOCKER_IMAGE="ghcr.io/${{ github.repository_owner }}/nfcompose-skipper:$RELEASE_VERSION" | |
export SKIPPER_PROXY_DOCKER_IMAGE="ghcr.io/${{ github.repository_owner }}/nfcompose-skipper-proxy:$RELEASE_VERSION" | |
cd skipper | |
exec python3 build.py \ | |
build \ | |
--imageName ghcr.io/${{ github.repository_owner }}/nfcompose-skipper \ | |
--buildBase | |
- name: "Run client Tests" | |
run: | | |
export NFCOMPOSE_SETUP_SKIP_PULL="yes" | |
export COMPOSE_PROJECT_NAME="ci_test_unit_tests" | |
export SKIPPER_DOCKER_IMAGE="ghcr.io/${{ github.repository_owner }}/nfcompose-skipper:$RELEASE_VERSION" | |
export SKIPPER_PROXY_DOCKER_IMAGE="ghcr.io/${{ github.repository_owner }}/nfcompose-skipper-proxy:$RELEASE_VERSION" | |
cd client | |
bash ci_test.sh || exit 1 | |
- name: Push skipper_proxy | |
run: | | |
ls -la | |
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh) | |
cd skipper_proxy | |
ARGS='--no-cache' exec bash push_production.sh | |
- name: "Build client source release" | |
run: | | |
cd client | |
python3 -m venv venv | |
source venv/bin/activate | |
(bash install_dev_dependencies.sh && python3 setup.py sdist) || exit 1 | |
# copy into separate file to prevent issues where the source and target are the same | |
mv dist/compose_client-2.2.14*.tar.gz dist/release.tar.gz | |
mv dist/release.tar.gz dist/compose_client-$RELEASE_VERSION.tar.gz | |
- name: "zip deploy/local folder" | |
run: | | |
cd deploy/local | |
zip -r deploy-local-$RELEASE_VERSION.zip ./ | |
- name: "zip deploy/production folder" | |
run: | | |
cd deploy/production/docker-compose | |
zip -r deploy-production-docker-compose-$RELEASE_VERSION.zip ./ | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./client/dist/compose_client-*.tar.gz | |
deploy/local/deploy-local-*.zip | |
deploy/production/docker-compose/deploy-production-docker-compose-*.zip |