Skip to content

Commit

Permalink
Adding xms2-ui workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-sandhu committed Aug 26, 2024
1 parent e114d43 commit 3e4dbfd
Showing 1 changed file with 17 additions and 31 deletions.
48 changes: 17 additions & 31 deletions .github/workflows/cd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Docker CD
on:
push:
branches:
- dev
- xms2-ui
pull_request:
branches:
- main
- xms2-ui
types: [opened, synchronize, reopened]

jobs:
Expand All @@ -29,34 +29,20 @@ jobs:
run: |
yarn install
# - name: Generate Coverage Report
# env:
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# run: |
# echo "Cloning private repository"
# git clone https://openlxp-host:${{ secrets.ACCESS_TOKEN }}@github.com/OpenLXP/openlxp-private.git
# echo "Private repository cloned successfully"
# echo "Copying .env file from openlxp-private to current working directory"
# cp ./openlxp-private/openlxp-xms-ui-env/.env .
# echo "Copied .env file successfully"
# echo "Create openlxp docker network"
# docker network create openlxp
# echo "Docker network successfully created"
# # yarn
# # yarn test --coverage
- name: Generate Coverage Report
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
echo "Cloning private repository"
git clone https://openlxp-host:${{ secrets.ACCESS_TOKEN }}@github.com/OpenLXP/openlxp-private.git
echo "Private repository cloned successfully"
echo "Copying .env file from openlxp-private to current working directory"
cp ./openlxp-private/openlxp-xms2-ui-env/.env .
echo "Copied .env file successfully"
echo "Create openlxp docker network"
docker network create openlxp
echo "Docker network successfully created"
# sonarcloud:
# name: SonarCloud
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
# - name: SonarCloud Scan
# uses: SonarSource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build:
# requires dependency from step above
Expand Down Expand Up @@ -85,13 +71,13 @@ jobs:
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPO }}
IMAGE_TAG: xmsui
IMAGE_TAG: xms2-ui
run: |
echo "Cloning private repository"
git clone https://openlxp-host:${{ secrets.ACCESS_TOKEN }}@github.com/OpenLXP/openlxp-private.git
echo "Private repository cloned successfully"
echo "Copying .env file from openlxp-private to current working directory"
cp ./openlxp-private/openlxp-xms-ui-env/.env .
cp ./openlxp-private/openlxp-xms2-ui-env/.env .
echo "Copied .env file successfully"
echo "Starting docker build"
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
Expand Down

0 comments on commit 3e4dbfd

Please sign in to comment.