Skip to content

Commit

Permalink
prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon KP committed May 16, 2024
1 parent 4cce0d7 commit e7bfcb1
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 54 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/angular-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
HELM_FILE: helm/staging/frontend.yaml

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -61,16 +61,6 @@ jobs:
docker push $ECR_REGISTRY/$AWS_ECR_NAME --all-tags
- name: Replace variables in the Helm values file
id: replace-vars
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# USERS_LIST: ${{ secrets.STAGING_USERS_LIST }}
run: |
sed -i 's/${ECR_REGISTRY}/'$ECR_REGISTRY/ $HELM_FILE
sed -i 's/${USERS_LIST}/'$USERS_LIST/ $HELM_FILE
- name: Deploying Service to Kubernetes with Helm
id: deploy
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/angular-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Prod Angular - Frontend

on:
push:
branches: [ main ]
branches: [ develop ]
paths:
- "frontend/**"
- ".github/workflows/angular-prod.yml"
Expand All @@ -20,7 +20,7 @@ jobs:
HELM_FILE: helm/prod/frontend.yaml

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -61,15 +61,6 @@ jobs:
docker push $ECR_REGISTRY/$AWS_ECR_NAME --all-tags
- name: Replace variables in the Helm values file
id: replace-vars
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
sed -i 's/${ECR_REGISTRY}/'$ECR_REGISTRY/ $HELM_FILE
sed -i 's/${USERS_LIST}/'$USERS_LIST/ $HELM_FILE
- name: Deploying Service to Kubernetes with Helm
id: deploy
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/node.js-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Running the Test Suit
env:
Expand Down Expand Up @@ -80,14 +80,6 @@ jobs:
docker push $ECR_REGISTRY/$AWS_ECR_NAME --all-tags
- name: Replace variables in the Helm values file
id: replace-vars
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
sed -i 's/${ECR_REGISTRY}/'$ECR_REGISTRY/ $HELM_FILE
- name: Deploying Service to Kubernetes with Helm
id: deploy
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/node.js-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Node.js Prod CI - Backend

on:
push:
branches: [ main ]
branches: [ develop ]
paths:
- "backend/**"
- ".github/workflows/node.js-prod.yml"
Expand All @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Running the Test Suit
env:
Expand Down Expand Up @@ -80,14 +80,6 @@ jobs:
docker push $ECR_REGISTRY/$AWS_ECR_NAME --all-tags
- name: Replace variables in the Helm values file
id: replace-vars
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
sed -i 's/${ECR_REGISTRY}/'$ECR_REGISTRY/ $HELM_FILE
- name: Deploying Service to Kubernetes with Helm
id: deploy
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-pull-request-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
node-version: [14.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -30,4 +30,3 @@ jobs:
npm run pre-start-develop
npm test
working-directory: backend

3 changes: 1 addition & 2 deletions .github/workflows/test-pull-request-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
node-version: [14.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -30,4 +30,3 @@ jobs:
npm run pre-start
npm test
working-directory: backend

1 change: 1 addition & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:14.16.1-alpine3.13 as builder
#FROM node:18.8.0-alpine3.16 TODO Upgrade

WORKDIR /usr/src/app

Expand Down
4 changes: 1 addition & 3 deletions helm/prod/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ service:
issuerName: letsencrypt

image:
repository: ${ECR_REGISTRY}/mips-backend-prod
pullPolicy: Always
tag: latest

serviceAccount:
create: false
Expand Down Expand Up @@ -54,7 +52,7 @@ env:
GIT_ACCESS_API_TOKEN:
type: parameterStore
name: webhooks-secret-token
parameter_name: /eks/maker-staging/mips-backend/git-access-api-token
parameter_name: /eks/maker-prod-eu/mips-backend/git-access-api-token

externalSecrets:
clusterSecretStoreName: maker-prod-eu
Expand Down
2 changes: 0 additions & 2 deletions helm/prod/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ service:
issuerName: letsencrypt

image:
repository: ${ECR_REGISTRY}/mips-frontend-prod
pullPolicy: Always
tag: latest

serviceAccount:
create: false
Expand Down
2 changes: 0 additions & 2 deletions helm/staging/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ service:
issuerName: letsencrypt

image:
repository: ${ECR_REGISTRY}/mips-backend-staging
pullPolicy: Always
tag: latest

serviceAccount:
create: false
Expand Down
2 changes: 0 additions & 2 deletions helm/staging/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ service:
issuerName: letsencrypt

image:
repository: ${ECR_REGISTRY}/mips-frontend-staging
pullPolicy: Always
tag: latest

serviceAccount:
create: false
Expand Down

0 comments on commit e7bfcb1

Please sign in to comment.