Skip to content

Commit

Permalink
build: added workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wakonig committed Aug 18, 2023
1 parent 120daa8 commit e0a1701
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/be.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: be

on:
workflow_dispatch:
inputs:
submodule_commit:
description: 'Commit of the submodule to deploy'
required: false
commit:
description: 'Commit of the CI repo to deploy'
required: false
pull_request:
branches: [ main ]
push:
branches: [ main ]
release:
types: [ published ]

jobs:

set_env:
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.environment.yml@main
with:
commit: ${{ github.event.inputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}

check_changed:
needs: set_env
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.changes.yml@main
with:
files: |
.github/workflows/be.yml
helm/configs/backend/${{ needs.set_env.outputs.environment }}/**
helm/configs/backend/values.yaml
scibec/backend/**
commit: ${{ needs.set_env.outputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: scibec

build_deploy_be:
if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'be'
needs:
- check_changed
- set_env
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.build-deploy.yml@main
with:
context: scibec/backend/.
image_name: ${{ github.repository }}/be
release_name: backend
namespace_prefix: bec-
tag: ${{ needs.set_env.outputs.tag }}
environment: ${{ needs.set_env.outputs.environment }}
commit: ${{ needs.set_env.outputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: scibec
secrets:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
JSON_SECRETS: ${{ toJSON(secrets) }}
57 changes: 57 additions & 0 deletions .github/workflows/fe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: fe

on:
workflow_dispatch:
inputs:
submodule_commit:
description: 'Commit of the submodule to deploy'
required: false
commit:
description: 'Commit of the CI repo to deploy'
required: false
pull_request:
branches: [ main ]
push:
branches: [ main ]
release:
types: [ published ]

jobs:

set_env:
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.environment.yml@main
with:
commit: ${{ github.event.inputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}

check_changed:
needs: set_env
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.changes.yml@main
with:
files: |
.github/workflows/fe.yml
helm/configs/frontend/${{ needs.set_env.outputs.environment }}/**
helm/configs/frontend/values.yaml
scibec/frontend/**
commit: ${{ needs.set_env.outputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: scibec

build_deploy:
if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'fe'
needs:
- check_changed
- set_env
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.build-deploy.yml@main
with:
context: scibec/frontend/.
image_name: ${{ github.repository }}/fe
release_name: frontend
namespace_prefix: bec-
tag: ${{ needs.set_env.outputs.tag }}
environment: ${{ needs.set_env.outputs.environment }}
commit: ${{ needs.set_env.outputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: scibec
secrets:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
60 changes: 60 additions & 0 deletions .github/workflows/proposal-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: proposal-sync

on:
workflow_dispatch:
inputs:
submodule_commit:
description: 'Commit of the submodule to deploy'
required: false
commit:
description: 'Commit of the CI repo to deploy'
required: false
pull_request:
branches: [ main ]
push:
branches: [ main ]
release:
types: [ published ]

jobs:

set_env:
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.environment.yml@main
with:
commit: ${{ github.event.inputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}

check_changed:
needs: set_env
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.changes.yml@main
with:
files: |
.github/workflows/proposal-sync.yml
helm/configs/proposal-sync/${{ needs.set_env.outputs.environment }}/**
helm/configs/proposal-sync/values.yaml
scilog/sdk/python/**
scilog/importTools/**
commit: ${{ needs.set_env.outputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: scilog

build_deploy:
if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'ps'
needs:
- check_changed
- set_env
uses: paulscherrerinstitute/scicat-ci/.github/workflows/reusable.build-deploy.yml@main
with:
context: scilog/importTools/.
image_name: ${{ github.repository }}/proposal-sync
release_name: proposal-sync
namespace_prefix: scilog-
tag: ${{ needs.set_env.outputs.tag }}
environment: ${{ needs.set_env.outputs.environment }}
helm_chart: helm/charts/cron_chart
commit: ${{ needs.set_env.outputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: scilog
secrets:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
JSON_SECRETS: ${{ toJSON(secrets) }}

0 comments on commit e0a1701

Please sign in to comment.