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

wf: add image updater workflow #2892

Merged
merged 1 commit into from
May 13, 2024
Merged
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
19 changes: 18 additions & 1 deletion .github/workflows/harbour-build-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
needs: python-tests
name: Build and export server image
runs-on: ubuntu-20.04
outputs:
image-id: ${{ steps.build.outputs.image-id }}

steps:
- uses: actions/checkout@v3
Expand All @@ -20,7 +22,8 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: get_branch

- name: Build and export
- id: build
name: Build and export
uses: cern-sis/gh-workflows/.github/actions/docker-build@v6.1.0
with:
dockerfile: ./docker/harbour/backend/Dockerfile
Expand All @@ -33,3 +36,17 @@ jobs:
password: ${{ secrets.HARBOR_PASSWORD }}
build-args: |
BRANCH_NAME=${{ steps.get_branch.outputs.BRANCH_NAME }}
deploy:
needs: build-image
name: update-image
runs-on: ubuntu-20.04

steps:
- name: send event
uses: cern-sis/gh-workflows/.github/actions/kubernetes-project-new-images@v6.4
with:
event-type: update
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES_CAP }}
repo: cern-sis/kubernetes-cap
images: |
cern-sis/cap-server@{{ needs.build-image.outputs.image-id }}
24 changes: 22 additions & 2 deletions .github/workflows/harbour-build-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
needs: UITest
name: Build and export ui image
runs-on: ubuntu-20.04
outputs:
image-id: ${{ steps.build-ui.outputs.image-id }}

steps:
- uses: actions/checkout@v3
Expand All @@ -21,7 +23,8 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: get_branch

- name: Build and export
- id: build-ui
name: Build and export
uses: cern-sis/gh-workflows/.github/actions/docker-build@v6.1.0
with:
dockerfile: ./docker/harbour/ui/Dockerfile
Expand All @@ -41,7 +44,8 @@ jobs:
CAP_PIWIK_SITEID_QA=${{ secrets.CAP_PIWIK_SITEID_QA }}
CAP_PIWIK_SITEID_TEST=${{ secrets.CAP_PIWIK_SITEID_TEST }}

- name: Build and export for end to end image
- id: build-ui-e2e
name: Build and export for end to end image
uses: cern-sis/gh-workflows/.github/actions/docker-build@v6.1.0
if: ${{ steps.get_branch.outputs.BRANCH_NAME }} == 'qa'
with:
Expand All @@ -59,3 +63,19 @@ jobs:
PIWIK_ENV=${{ steps.get_branch.outputs.BRANCH_NAME }}
CAP_PIWIK_URL=${{ secrets.CAP_PIWIK_URL }}
CAP_PIWIK_SITEID_QA=${{ secrets.CAP_PIWIK_SITEID_QA }}

deploy:
needs: build-image
name: update-image
runs-on: ubuntu-20.04

steps:
- name: send event
uses: cern-sis/gh-workflows/.github/actions/kubernetes-project-new-images@v6.4
with:
event-type: update
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES_CAP }}
repo: cern-sis/kubernetes-cap
images: |
cern-sis/cap-ui@{{ needs.build-image.outputs.image-id }}

Loading