Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Deploy Jobs Release #233

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 57 additions & 54 deletions .github/workflows/scicat-be-next.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,62 @@
# name: scicat-be-next
name: scicat-be-next

# 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 ]
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:
jobs:

# set_env:
# uses: ./.github/workflows/reusable.environment.yml
# with:
# commit: ${{ github.event.inputs.commit }}
# submodule_commit: ${{ github.event.inputs.submodule_commit }}
set_env:
uses: ./.github/workflows/reusable.environment.yml
with:
commit: ${{ github.event.inputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}

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

# build_deploy_scicat_backend_next:
# if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'bn'
# needs:
# - check_changed
# - set_env
# uses: ./.github/workflows/reusable.build-deploy.yml
# with:
# context: scicat-backend-next/.
# image_name: ${{ github.repository }}/backend-next
# release_name: backend-next
# 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: scicat-backend-next
# secrets:
# KUBECONFIG: ${{ secrets.KUBECONFIG }}
# JSON_SECRETS: ${{ toJSON(secrets) }}
# BASTION_USER: ${{ secrets.BASTION_USER }}
# BASTION_SSH_KEY: ${{ secrets.BASTION_SSH_KEY }}
build_deploy_scicat_backend_next:
if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'bn'
needs:
- check_changed
- set_env
uses: ./.github/workflows/reusable.build-deploy.yml
permissions:
contents: read
packages: write
with:
context: scicat-backend-next/.
image_name: ${{ github.repository }}/backend-next
release_name: backend-next
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: scicat-backend-next
secrets:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
JSON_SECRETS: ${{ toJSON(secrets) }}
BASTION_USER: ${{ secrets.BASTION_USER }}
BASTION_SSH_KEY: ${{ secrets.BASTION_SSH_KEY }}
130 changes: 65 additions & 65 deletions .github/workflows/scicat-be.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
name: scicat-be
# name: scicat-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]
# 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:
# jobs:

set_env:
uses: ./.github/workflows/reusable.environment.yml
with:
commit: ${{ github.event.inputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
# set_env:
# uses: ./.github/workflows/reusable.environment.yml
# with:
# commit: ${{ github.event.inputs.commit }}
# submodule_commit: ${{ github.event.inputs.submodule_commit }}

check_changed:
needs: set_env
uses: ./.github/workflows/reusable.changes.yml
with:
files: |
.github/workflows/scicat-be.yml
helm/configs/backend/values.yaml
helm/configs/backend/login-callbacks.js
helm/configs/backend/config.local.js
helm/configs/backend/job-template.html
helm/configs/backend/${{ needs.set_env.outputs.environment }}/**
backend/**
helm/configs/backend/authorizedJobs.js
commit: ${{ needs.set_env.outputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: backend
# check_changed:
# needs: set_env
# uses: ./.github/workflows/reusable.changes.yml
# with:
# files: |
# .github/workflows/scicat-be.yml
# helm/configs/backend/values.yaml
# helm/configs/backend/login-callbacks.js
# helm/configs/backend/config.local.js
# helm/configs/backend/job-template.html
# helm/configs/backend/${{ needs.set_env.outputs.environment }}/**
# backend/**
# helm/configs/backend/authorizedJobs.js
# commit: ${{ needs.set_env.outputs.commit }}
# submodule_commit: ${{ github.event.inputs.submodule_commit }}
# submodule: backend

build_deploy_scicat_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: ./.github/workflows/reusable.build-deploy.yml
with:
context: backend/.
image_name: ${{ github.repository }}/be
release_name: backend
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: backend
helm_set_files: >-
CONFIG_LOCAL=helm/configs/backend/config.local.js
LOGIN_CALLBACKS=helm/configs/backend/login-callbacks.js
MIDDLEWARE=helm/configs/backend/${{ needs.set_env.outputs.environment }}/middleware.json
EMAIL_TEMPLATE=helm/configs/backend/job-template.html
HIDE_EMAIL=helm/configs/backend/hideEmail.js
AUTHORIZED_JOBS=helm/configs/backend/authorizedJobs.js
secrets:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
JSON_SECRETS: ${{ toJSON(secrets) }}
BASTION_USER: ${{ secrets.BASTION_USER }}
BASTION_SSH_KEY: ${{ secrets.BASTION_SSH_KEY }}
# build_deploy_scicat_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: ./.github/workflows/reusable.build-deploy.yml
# with:
# context: backend/.
# image_name: ${{ github.repository }}/be
# release_name: backend
# 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: backend
# helm_set_files: >-
# CONFIG_LOCAL=helm/configs/backend/config.local.js
# LOGIN_CALLBACKS=helm/configs/backend/login-callbacks.js
# MIDDLEWARE=helm/configs/backend/${{ needs.set_env.outputs.environment }}/middleware.json
# EMAIL_TEMPLATE=helm/configs/backend/job-template.html
# HIDE_EMAIL=helm/configs/backend/hideEmail.js
# AUTHORIZED_JOBS=helm/configs/backend/authorizedJobs.js
# secrets:
# KUBECONFIG: ${{ secrets.KUBECONFIG }}
# JSON_SECRETS: ${{ toJSON(secrets) }}
# BASTION_USER: ${{ secrets.BASTION_USER }}
# BASTION_SSH_KEY: ${{ secrets.BASTION_SSH_KEY }}
25 changes: 14 additions & 11 deletions .github/workflows/scicat-fe.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: scicat-fe

on:
workflow_dispatch:
on:
workflow_dispatch:
inputs:
submodule_commit:
description: 'Commit of the submodule to deploy'
description: 'Commit of the submodule to deploy'
required: false
commit:
description: 'Commit of the CI repo to deploy'
commit:
description: 'Commit of the CI repo to deploy'
required: false
pull_request:
branches: [ main ]
Expand All @@ -18,17 +18,17 @@ on:

jobs:

set_env:
set_env:
uses: ./.github/workflows/reusable.environment.yml
with:
with:
commit: ${{ github.event.inputs.commit }}
submodule_commit: ${{ github.event.inputs.submodule_commit }}

check_changed:
needs: set_env
uses: ./.github/workflows/reusable.changes.yml
with:
files: |
with:
files: |
.github/workflows/scicat-fe.yml
helm/configs/frontend/values.yaml
helm/configs/frontend/login.component.html
Expand All @@ -40,11 +40,14 @@ jobs:

build_deploy_scicat_fe:
if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'fe'
needs:
needs:
- check_changed
- set_env
uses: ./.github/workflows/reusable.build-deploy.yml
with:
permissions:
contents: read
packages: write
with:
context: frontend/.
image_name: ${{ github.repository }}/fe
release_name: frontend
Expand Down
2 changes: 1 addition & 1 deletion frontend
Submodule frontend updated 557 files
2 changes: 1 addition & 1 deletion helm/configs/frontend/development/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lbBaseURL": "https://dacat-development.psi.ch",
"accessTokenPrefix": "",
"accessTokenPrefix": "Bearer ",
"archiveWorkflowEnabled": true,
"retrieveDestinations": [
{
Expand Down
2 changes: 1 addition & 1 deletion scicat-backend-next
Loading