Skip to content

Commit

Permalink
Merge dev to main (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: XITASO\pawel.baran <pawel.baran@xitaso.com>
Co-authored-by: Moritz Hofer <moritz.hofer@xitaso.com>
Co-authored-by: Alina Geesen <alina.geesen@xitaso.com>
Co-authored-by: Milo Franke <milo.franke@xitaso.com>
Co-authored-by: m-weslati <mohamed.weslati@xitaso.com>
  • Loading branch information
6 people committed Jun 27, 2024
1 parent 8a02baf commit 0f77ee5
Show file tree
Hide file tree
Showing 48 changed files with 513 additions and 139 deletions.
3 changes: 2 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ DISCOVERY_API_URL: 'http://localhost:5064/discovery'
REGISTRY_API_URL: 'http://localhost:8083'
THEME_LOGO_MIME_TYPE: 'image/svg+xml'
THEME_PRIMARY_COLOR: '#0d4453'
THEME_SECONDARY_COLOR: '#147f8a'
THEME_SECONDARY_COLOR: '#147f8a'
THEME_LOGO_URL: https://xitaso.com/wp-content/uploads/XITASO-Logo-quer.svg
83 changes: 83 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Docker

on:
push:
branches: [ "**" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "**" ]

env:
# github.repository as <account>/<repo>
IMAGE_NAME: mnestix-browser
IMAGE_TAG: latest
# Update the version manually
IMAGE_TAG_VERSION: 1.0.0
AD_CLIENT_ID: ${{ secrets.AD_CLIENT_ID }}
AD_TENANT_ID: ${{ secrets.AD_TENANT_ID }}
REGISTRY_USER: ${{ vars.REGISTRY_USER }}
REGISTRY_PASS: ${{ secrets.REGISTRY_PASS }}
AZURE_REGISTRY_PASS: ${{ secrets.AZURE_REGISTRY_PASS }}
AZURE_REGISTRY_USER: ${{ vars.AZURE_REGISTRY_USER }}

jobs:
default:
name: build, test and push image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Extract branch name
id: extract_branch
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

- name: Checkout repository
uses: actions/checkout@v4

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into docker hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASS }}

# Build Docker image
- name: Build image
id: build
run: docker compose -f docker-compose/compose.yml build mnestix-frontend

- name: E2E test
id: test
run: docker compose -f docker-compose/common-services.yml pull &&
docker compose -f docker-compose/compose.test.yml down &&
docker compose -f docker-compose/compose.test.yml up -d &&
docker compose -f docker-compose/compose.test.yml attach cypress-test

- name: E2E test collect artifact
id: test_artifact
uses: actions/upload-artifact@master
with:
name: cypress-artifacts
path: cypress-artifacts/

- name: Push Image to Production
id: push-prod
if: github.ref == 'refs/heads/main'
run: docker tag mnestix/$IMAGE_NAME mnestix/$IMAGE_NAME:$IMAGE_TAG &&
docker tag mnestix/$IMAGE_NAME mnestix/$IMAGE_NAME:$IMAGE_TAG_VERSION &&
docker push mnestix/$IMAGE_NAME:$IMAGE_TAG &&
docker push mnestix/$IMAGE_NAME:$IMAGE_TAG_VERSION

- name: Push Image to development
id: push-dev
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging'
env:
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
run: docker tag mnestix/$IMAGE_NAME mnestixcr.azurecr.io/$IMAGE_NAME:$BRANCH_NAME &&
docker login -u $AZURE_REGISTRY_USER -p $AZURE_REGISTRY_PASS mnestixcr.azurecr.io &&
docker push mnestixcr.azurecr.io/$IMAGE_NAME:$BRANCH_NAME

5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/mnestix-frontend.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0f77ee5

Please sign in to comment.