Skip to content

[MDS-6132] Fixing bugs around Project Description Overview (#3250) #630

[MDS-6132] Fixing bugs around Project Description Overview (#3250)

[MDS-6132] Fixing bugs around Project Description Overview (#3250) #630

name: MINESPACE - Build & Deploy To DEV
on:
workflow_dispatch:
push:
branches:
- develop
paths:
- services/common/**
- services/minespace-web/**
- .github/workflows/minespace.build.deploy.dev.yaml
env:
INITIAL_TAG: latest
TAG: dev
NAME: minespace
CONTEXT: services/minespace-web/
jobs:
build-minespace:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login
run: |
docker login -u ${{ secrets.CLUSTER_REGISTRY_USER }} -p ${{ secrets.BUILD_TOKEN }} ${{ secrets.CLUSTER_REGISTRY }}
# - uses: satackey/[email protected]
# # Ignore the failure of a step and avoid terminating the job.
# continue-on-error: true
- name: Build n Tag
run: |
docker build --build-arg ARTIFACTORY_TOKEN=${{ secrets.ARTIFACTORY_TOKEN }} -t ${{ env.NAME }}:${{ env.INITIAL_TAG }} . -f ${{ env.CONTEXT }}Dockerfile.ci
docker tag ${{ env.NAME }}:${{ env.INITIAL_TAG }} ${{ secrets.CLUSTER_REGISTRY }}/${{ secrets.NS_TOOLS }}/${{ env.NAME }}:${{ env.INITIAL_TAG }}
docker tag ${{ env.NAME }}:${{ env.INITIAL_TAG }} ${{ secrets.CLUSTER_REGISTRY }}/${{ secrets.NS_TOOLS }}/${{ env.NAME }}:${{ env.TAG }}
- name: Push
run: |
docker push --all-tags ${{ secrets.CLUSTER_REGISTRY }}/${{ secrets.NS_TOOLS }}/${{ env.NAME }}
trigger-gitops:
runs-on: ubuntu-20.04
timeout-minutes: 15
needs: [build-minespace]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Git Ops Push
run: ./gitops/commit.sh minespace dev dev ${{ github.actor }} ${{ secrets.GH_TOKEN }}
- name: Install oc
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: Setup ArgoCD CLI
uses: imajeetyadav/argocd-cli@v1
with:
version: v2.7.9 # optional
- name: oc login
run: oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Notification
run: ./gitops/watch-deployment.sh minespace dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} ${{ secrets.ARGOCD_SERVER }} ${{ secrets.ARGO_CD_CLI_JWT }}
run-if-failed:
runs-on: ubuntu-20.04
needs: [trigger-gitops]
if: always() && (needs.trigger-gitops.result == 'failure')
steps:
- name: Notification
run: ./gitops/watch-deployment.sh minespace dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 1