Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Deploy dsba changes (#12) #32

Deploy dsba changes (#12)

Deploy dsba changes (#12) #32

Workflow file for this run

name: Deploy into existing namespace
on:
push:
branches:
- 'deploy/**'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: false
env:
# Repo containing participant connector values file in respective namespace folder
GITOPS_REPO: https://raw.githubusercontent.com/FIWARE-Ops/fiware-gitops/master/aws
# Directory for each participant containing connector values file
VALUES_DIR: data-space-connector
jobs:
deploy:
runs-on: ubuntu-latest
# Deployment for participants, <GITOPS_REPO> must contain folder for each participant
# Will look for values.yaml file at: <GITOPS_REPO>/<NAMESPACE>/<PARTICIPANT>/<VALUES_DIR>/values.yaml
strategy:
matrix:
participant: ["packet-delivery"]
steps:
- name: Git checkout
uses: actions/checkout@v1
- name: Authenticate and set context
uses: redhat-actions/oc-login@v1
with:
# URL to your OpenShift cluster.
# Refer to Step 2.
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
# Authentication Token. Can use username and password instead.
# Refer to Step 3.
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
# Disables SSL cert checking. Use this if you don't have the certificate authority data.
insecure_skip_tls_verify: true
# extract the current branch name and provide it as a var for easier integration into sed-commands
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Log the branch name used as namespace
run: |
echo ${{ steps.branch-name.outputs.current_branch }}
- name: Get namespace from branch name
run: |
echo "NAMESPACE=$(echo ${{ steps.branch-name.outputs.current_branch }} | cut -d "/" -f 2)" >> "$GITHUB_ENV"
- name: Log the namespace
run: |
echo ${{ env.NAMESPACE }}
- name: Log the participant
run: |
echo ${{ matrix.participant }}
- name: Download values for participant
run: |
cd data-space-connector/
wget -O values-participant.yaml ${{ env.GITOPS_REPO }}/${{ env.NAMESPACE }}/${{ matrix.participant }}/${{ env.VALUES_DIR }}/values.yaml
cat values-participant.yaml
- name: Deploy applications
run: |
cd data-space-connector/
helm template ${{ secrets.OVERWRITE_VALUES }} -f values-participant.yaml . | oc -n argocd apply -f -