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

Commit

Permalink
Bugfixes in Blueberry UI deployment pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvanb committed Jan 5, 2024
1 parent 457ed21 commit 83b75bd
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/deploy_blueberry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,41 @@
# The current workflow is only for the blueberry UI. Then we should also adapt
# the other pipeline to only update the images.

name: Build and deploy Node.js app to Azure Web App - ui-cotopaxi
name: Build and deploy Node.js app to Azure Web App - ui-blueberry

on:
push:
branch:
branches:
- feature/deployment-blueberry-ui

jobs:
# get version info from existing tags
version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get latest tag
id: get-tag
run: |
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo $TAG
VERSION=${TAG#version/*}
echo $VERSION
PARTS=(${VERSION//\./ })
MAJOR=${PARTS[0]}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
PARTS2=( $(grep -Eo '[[:digit:]]+|[^[:digit:]]+' <<< ${PARTS[2]} ) )
echo "stage=${PARTS2[1]}" >> $GITHUB_OUTPUT
MAJOR_NAME=''
if [[ $MAJOR == '4' ]]; then MAJOR_NAME="cotopaxi"; fi
if [[ $MAJOR == '3' ]]; then MAJOR_NAME="petronas"; fi
echo "major_name=${MAJOR_NAME}" >> $GITHUB_OUTPUT
outputs:
version: ${{ steps.split.outputs.version }}
stage: ${{ steps.split.outputs.stage }}
major_name: ${{ steps.split.outputs.major_name }}
# get version info from existing tags
version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get latest tag
id: get-tag
run: |
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo $TAG
VERSION=${TAG#version/*}
echo $VERSION
PARTS=(${VERSION//\./ })
MAJOR=${PARTS[0]}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
PARTS2=( $(grep -Eo '[[:digit:]]+|[^[:digit:]]+' <<< ${PARTS[2]} ) )
echo "stage=${PARTS2[1]}" >> $GITHUB_OUTPUT
MAJOR_NAME=''
if [[ $MAJOR == '4' ]]; then MAJOR_NAME="cotopaxi"; fi
if [[ $MAJOR == '3' ]]; then MAJOR_NAME="petronas"; fi
echo "major_name=${MAJOR_NAME}" >> $GITHUB_OUTPUT
outputs:
version: ${{ steps.get-tag.outputs.version }}
stage: ${{ steps.get-tag.outputs.stage }}
major_name: ${{ steps.get-tag.outputs.major_name }}

# Build artifact for deployment
build:
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
url: ${{ steps.deploy-to-webapp-blueberry.outputs.webapp-url }}

steps:
- name: Download artifact from build job
Expand Down

0 comments on commit 83b75bd

Please sign in to comment.