Add 1.15 release notes (#2605) #83
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: Build RDO packages | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
tags: | |
- v* | |
workflow_dispatch: | |
env: | |
PKGDIR: /home/runner/work/nl-kat-coordination | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
# Generic bits | |
steps: | |
- name: Prep Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Prep Install requirements | |
run: sudo apt install gettext -y | |
- name: Prep Replace version number with release version | |
run: find . -type f -name 'version.py' -exec sed -ibak "s/__version__ = .*/__version__ = \"${RELEASE_VERSION}\"/" {} \; | |
- name: Prep Configure git | |
run: git config --global url."https://github.com/".insteadOf "ssh://[email protected]/" | |
# Octopoes | |
- name: Octopoes Create /var/lib/html | |
run: sudo rm -rfv /var/lib/html; sudo mkdir -p /var/www/html ; sudo chown `id -u`:`id -g` /var/www/html | |
- name: Octopoes copy project to run location. | |
run: cp -rv * /var/www/html | |
working-directory: ./octopoes | |
- name: Octopoes Build whl package | |
run: | | |
python3.10 -m pip install build | |
python3.10 -m build | |
working-directory: ./octopoes | |
- name: Octopoes Create env | |
run: python3.10 -m venv /var/www/html/.venv | |
- name: Octopoes Install requirements | |
run: cd /var/www/html; source .venv/bin/activate; pip install --upgrade pip; pip install --requirement requirements.txt | |
- name: Octopoes Create venv archive | |
run: tar -zcvf ${{ env.PKGDIR }}/octopoes_venv_${{ env.RELEASE_VERSION }}.tar.gz -C /var/www/html/ .venv | |
- name: Octopoes Enable production logging config | |
run: mv prod.logging.yml logging.yml | |
working-directory: ./octopoes | |
- name: Octopoes Create Octopoes release | |
run: tar -cvzf ${{ env.PKGDIR }}/octopoes_${{ env.RELEASE_VERSION }}.tar.gz . | |
working-directory: ./octopoes | |
- name: Octopoes Build Octopoes wheel | |
run: cd octopoes && /usr/bin/python3 setup.py bdist_wheel | |
- name: Octopoes Cleanup | |
run: sudo rm -rfv /var/www/html/ | |
# Rocky | |
- name: Rocky Create /var/lib/html | |
run: sudo rm -rfv /var/lib/html; sudo mkdir -p /var/www/html ; sudo chown `id -u`:`id -g` /var/www/html | |
- name: Rocky copy project to run location. | |
run: cp -rv * /var/www/html | |
working-directory: ./rocky | |
- name: Rocky Create env | |
run: python3.10 -m venv /var/www/html/.venv | |
- name: Rocky Install requirements | |
run: cd /var/www/html; source .venv/bin/activate; pip install --upgrade pip; grep -v git+https:// requirements.txt | pip install -r /dev/stdin ; grep git+https:// requirements.txt | pip install -r /dev/stdin; pip install ${{ github.workspace }}/octopoes/dist/octopoes*.whl | |
- name: Rocky Create rocky_venv tarball | |
run: tar -zcvf ${{ env.PKGDIR }}/rocky_venv_${{ env.RELEASE_VERSION }}.tar.gz -C /var/www/html/ .venv | |
- name: Rocky Run nvm install | |
run: nvm install v16 | |
shell: bash --login {0} | |
working-directory: ./rocky | |
- name: Rocky Run nvm use | |
run: nvm use | |
shell: bash --login {0} | |
working-directory: ./rocky | |
- name: Rocky Run yarn for rocky | |
run: yarn | |
shell: bash --login {0} | |
working-directory: ./rocky | |
- name: Rocky Run yarn build for rocky | |
run: yarn build | |
shell: bash --login {0} | |
working-directory: ./rocky | |
- name: Rocky Compilemessages | |
run: /var/www/html/.venv/bin/python3.10 manage.py collectstatic && /var/www/html/.venv/bin/python3.10 manage.py compress && /var/www/html/.venv/bin/python3.10 manage.py compilemessages | |
working-directory: ./rocky | |
env: | |
BYTES_API: http://bytes:8000 | |
BYTES_PASSWORD: password | |
BYTES_USERNAME: username | |
KATALOGUS_API: http://katalogus:8000 | |
KEIKO_API: http://keiko:8000 | |
OCTOPOES_API: http://octopoes_api:80 | |
SCHEDULER_API: http://scheduler:8000 | |
SECRET_KEY: whatever | |
- name: Rocky Create rocky release | |
run: tar -cvzf ${{ env.PKGDIR }}/rocky_${{ env.RELEASE_VERSION }}.tar.gz --exclude node_modules --exclude rocky_venv* --exclude=.git* --exclude .parcel-cache --exclude Dockerfile . | |
working-directory: ./rocky | |
# Bytes | |
- name: Bytes Create /var/lib/html | |
run: sudo rm -rfv /var/lib/html; sudo mkdir -p /var/www/html ; sudo chown `id -u`:`id -g` /var/www/html | |
- name: Bytes copy project to run location. | |
run: cp -rv * /var/www/html | |
working-directory: ./bytes | |
- name: Bytes Create env | |
run: python3.10 -m venv /var/www/html/.venv | |
- name: Bytes Install requirements | |
run: cd /var/www/html; source .venv/bin/activate; pip install --upgrade pip; pip install --requirement requirements.txt | |
- name: Bytes Create bytes release | |
run: tar -cvzf ${{ env.PKGDIR }}/bytes_${{ env.RELEASE_VERSION }}.tar.gz --exclude=./.git* . | |
working-directory: ./bytes | |
- name: Bytes Create bytes venv package | |
run: tar -zcvf ${{ env.PKGDIR }}/bytes_venv_${{ env.RELEASE_VERSION }}.tar.gz -C /var/www/html/ .venv | |
# Mula / Scheduler | |
- name: Mula Create /var/lib/html | |
run: sudo rm -rfv /var/lib/html; sudo mkdir -p /var/www/html ; sudo chown `id -u`:`id -g` /var/www/html | |
- name: Mula copy project to run location. | |
run: cp -rv * /var/www/html | |
working-directory: ./mula | |
- name: Mula Create env | |
run: python3.10 -m venv /var/www/html/.venv | |
- name: Create scheduler release archive | |
run: tar -cvzf ${{ env.PKGDIR }}/scheduler_${{ env.RELEASE_VERSION }}.tar.gz --exclude=./.git* --exclude=Makefile --exclude=Dockerfile --exclude=base.yml --exclude=requirements* --exclude=tests . | |
working-directory: ./mula | |
- name: Create virtual env | |
run: python3.10 -m venv /var/www/html/.venv | |
- name: Install requirements | |
run: source .venv/bin/activate; pip install --upgrade pip; pip install --requirement requirements.txt | |
working-directory: /var/www/html | |
- name: Create venv archive | |
run: tar -zcvf ${{ env.PKGDIR }}/scheduler_venv_${{ env.RELEASE_VERSION }}.tar.gz -C /var/www/html/ .venv | |
# Boefjes | |
- name: Boefjes Create /var/lib/html | |
run: sudo rm -rfv /var/lib/html; sudo mkdir -p /var/www/html ; sudo chown `id -u`:`id -g` /var/www/html | |
- name: Boefjes copy project to run location. | |
run: cp -rv * /var/www/html | |
working-directory: ./boefjes | |
- name: Boefjes Create env | |
run: python3.10 -m venv /var/www/html/.venv | |
- name: Install requirements | |
run: source .venv/bin/activate; pip install --upgrade pip; find . -name requirements.txt | xargs -L 1 pip install -r; pip install ${{ github.workspace }}/octopoes/dist/octopoes*.whl | |
working-directory: /var/www/html | |
- name: Create archive | |
run: tar -zcvf ${{ env.PKGDIR }}/boefjes_venv_${{ env.RELEASE_VERSION }}.tar.gz -C /var/www/html/ .venv | |
- name: Create boefjes release | |
run: tar -cvzf ${{ env.PKGDIR }}/boefjes_${{ env.RELEASE_VERSION }}.tar.gz . | |
working-directory: ./boefjes | |
# Keiko | |
- name: Keiko Create /var/lib/html | |
run: sudo rm -rfv /var/lib/html; sudo mkdir -p /var/www/html ; sudo chown `id -u`:`id -g` /var/www/html | |
- name: Keiko copy project to run location. | |
run: cp -rv * /var/www/html | |
working-directory: ./keiko | |
- name: Keiko Create env | |
run: python3.10 -m venv /var/www/html/.venv | |
- name: Keiko Install requirements | |
run: source .venv/bin/activate; pip install --upgrade pip; find . -name requirements.txt | xargs -L 1 pip install -r | |
working-directory: /var/www/html | |
- name: Keiko Create archive | |
run: tar -zcvf ${{ env.PKGDIR }}/katkeiko_venv_${{ env.RELEASE_VERSION }}.tar.gz -C /var/www/html/ .venv | |
- name: Keiko Create katkeiko release | |
run: tar -cvzf ${{ env.PKGDIR }}/katkeiko_${{ env.RELEASE_VERSION }}.tar.gz . | |
working-directory: ./keiko | |
# Common / Uploads | |
- name: Octopoes Upload whl package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "octopoes-${{env.RELEASE_VERSION}}" | |
path: "${{ github.workspace }}/octopoes/dist/octopoes*.whl" | |
- name: Octopoes Upload venv tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: octopoes_venv_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/octopoes_venv_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Octopoes Upload octopoes tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: octopoes_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/octopoes_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Rocky Upload rocky tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rocky_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/rocky_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Rocky Upload venv tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rocky_venv_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/rocky_venv_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Bytes Upload bytes tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bytes_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/bytes_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Bytes Upload bytes venv tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bytes_venv_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/bytes_venv_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Upload scheduler release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: scheduler_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/scheduler_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Upload venv archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: scheduler_venv_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/scheduler_venv_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Upload boefjes tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: boefjes_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/boefjes_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Upload venv tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: boefjes_venv_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/boefjes_venv_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Keiko Upload tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: katkeiko_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/katkeiko_${{ env.RELEASE_VERSION }}.tar.gz | |
- name: Keiko Upload venv tar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: katkeiko_venv_${{ env.RELEASE_VERSION }} | |
path: ${{ env.PKGDIR }}/katkeiko_venv_${{ env.RELEASE_VERSION }}.tar.gz |