Skip to content

Merge pull request #268 from alercebroker/deployment-elasticc #81

Merge pull request #268 from alercebroker/deployment-elasticc

Merge pull request #268 from alercebroker/deployment-elasticc #81

Workflow file for this run

name: Staging CI Pipeline
on:
push:
branches:
- main
concurrency: staging
jobs:
update-packages-dagger:
runs-on: ubuntu-latest
env:
GHCR_TOKEN: ${{ secrets.ADMIN_TOKEN }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'poetry'
- name: Install dependencies
run: |
cd ci
poetry install
- name: Run dagger pipeline
run: |
cd ci
poetry run python main.py update-versions staging \
alert_archiving_step correction_step early_classification_step feature_step \
lc_classification_step lightcurve-step magstats_step metadata_step prv_candidates_step \
s3_step scribe sorting_hat_step watchlist_step xmatch_step
build-alert-archiving-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: production
extra-args: alert_archiving_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-correction-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: correction_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-early-classification-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: early_classification_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-feature-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: feature_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-lc-classification-balto-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: lc_classification_step_balto --build-args=model:balto --package-dir=lc_classification_step
submodules: true
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-lc-classification-mlp-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: lc_classification_step_mlp --build-args=model:mlp --package-dir=lc_classification_step
submodules: true
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-lc-classification-messi-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: lc_classification_step_messi --build-args=model:messi --package-dir=lc_classification_step
submodules: true
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-lc-classification-ztf-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: lc_classification_step_ztf --build-args=model:ztf --package-dir=lc_classification_step
submodules: true
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-lightcurve-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: lightcurve-step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-magstats-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: magstats_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-metadata-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: metadata_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-prv-candidates-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: prv_candidates_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-s3-step-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: s3_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-scribe-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: scribe
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-sorting-hat-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: sorting_hat_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-watchlist-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: watchlist_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
build-xmatch-dagger:
needs: update-packages-dagger
uses: ./.github/workflows/template_build_with_dagger.yaml
with:
stage: staging
extra-args: xmatch_step
secrets:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
release-chart:
needs:
- build-alert-archiving-dagger
- build-correction-dagger
- build-early-classification-dagger
- build-feature-dagger
- build-lc-classification-balto-dagger
- build-lc-classification-mlp-dagger
- build-lc-classification-messi-dagger
- build-lc-classification-ztf-dagger
- build-lightcurve-dagger
- build-magstats-dagger
- build-metadata-dagger
- build-prv-candidates-dagger
- build-s3-step-dagger
- build-scribe-dagger
- build-sorting-hat-dagger
- build-watchlist-dagger
- build-xmatch-dagger
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Configure Git
run: |
git config user.name "alerceadmin"
git config user.email "[email protected]"
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.ADMIN_TOKEN }}"
deploy_staging:
needs: release-chart
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
- name: Configure AWS credentials
id: creds
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_ROLE_STAGING }}
aws-region: us-east-1
output-credentials: true
unset-current-credentials: true
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'poetry'
- name: Install dependencies
run: |
cd ci
poetry install
- name: Run dagger pipeline
run: |
cd ci
poetry run python main.py deploy staging \
alert-archive-step --chart=alert-archive-step --values=alert_archive_step-helm-values --folder=alert_archiving_step \
correction-step --values=correction_step-helm-values --folder=correction_step \
early-classification-step --chart=early-classifier --values=early_classification_step-helm-values --folder=early_classification_step \
feature-step --values=feature_step-helm-values --folder=feature_step \
lc-classifier-step-ztf --chart=lc-classifier-step --values=lc_classification_step_ztf-helm-values --folder=lc_classification_step \
lightcurve-step --values=lightcurve-step-helm-values \
magstats-step --values=magstats_step-helm-values --folder=magstats_step \
metadata-step --values=metadata_step-helm-values --folder=metadata_step \
prv-candidates-step --chart=prv-candidates --values=prv_candidates_step-helm-values --folder=prv_candidates_step \
s3-step --values=s3_step-helm-values --folder=s3_step \
scribe-mongo --chart=scribe --values=scribe-helm-values --folder=scribe \
scribe-psql --chart=scribe --values=scribe-psql-helm-values --folder=scribe \
sorting-hat-step-ztf --chart=sorting-hat --values=sorting_hat_step_ztf-helm-values --folder=sorting_hat_step \
sorting-hat-step-atlas --chart=sorting-hat --values=sorting_hat_step_atlas-helm-values --folder=sorting_hat_step \
watchlist-step --values=watchlist_step-helm-values --folder=watchlist_step \
xmatch-step --values=xmatch_step-helm-values --folder=xmatch_step