test-continuous-deployment/.gitea/workflows/test-deployment.yml

53 lines
1.6 KiB
YAML
Raw Normal View History

2024-06-03 02:24:20 +00:00
name: Continuous Stack Deployment Test
on:
push:
branches: '*'
2024-06-06 17:29:49 +00:00
paths:
- '!**'
- '.gitea/workflows/triggers/test-deployment'
2024-06-06 17:50:26 +00:00
- '.gitea/workflows/test-deployment.yml'
2024-06-03 02:24:20 +00:00
2024-06-10 12:20:17 +00:00
env:
# CERC_SCRIPT_DEBUG: true
CERC_REPO_BASE_DIR: ${{ gitea.workspace }}/repo-base-dir
2024-06-03 02:24:20 +00:00
jobs:
test:
name: "Deploy test stack"
runs-on: ubuntu-latest
steps:
- name: "Clone project repository"
2024-06-06 17:29:49 +00:00
uses: actions/checkout@v4
2024-06-06 17:45:38 +00:00
with:
2024-06-10 12:20:17 +00:00
path: 'deployment-repo'
2024-06-03 02:24:20 +00:00
# At present the stock setup-python action fails on Linux/aarch64
# Conditional steps below workaroud this by using deadsnakes for that case only
- name: "Install Python for ARM on Linux"
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
uses: deadsnakes/action@v3.0.1
with:
python-version: '3.8'
- name: "Install Python cases other than ARM on Linux"
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: "Print Python version"
run: python3 --version
- name: "Install stack orchestrator"
2024-06-06 17:50:26 +00:00
run: ./deployment-tools/scripts/install-so.sh
2024-06-06 17:29:49 +00:00
- name: "Clone target stack"
uses: actions/checkout@v4
with:
repository: cerc-io/test-deployment-stack
2024-06-10 12:20:17 +00:00
token: ${{ secrets.CICD_REPO_TOKEN }}
2024-06-06 17:41:54 +00:00
ref: 'main'
path: 'test-deployment-stack'
2024-06-06 17:29:49 +00:00
- name: "Show checked out files"
run: ls -lR
2024-06-10 12:20:17 +00:00
- name: "Test deployment scripting"
2024-06-03 02:24:20 +00:00
run: |
PATH=$PATH:~/bin
2024-06-10 12:20:17 +00:00
./deployment-repo/deploy/deploy-stack.sh test main