This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix cicd prod Signed-off-by: Ayman <[email protected]> * clean up Signed-off-by: Ayman <[email protected]> Signed-off-by: Ayman <[email protected]> Co-authored-by: Ayman <[email protected]>
- Loading branch information
1 parent
c5450a0
commit c084eaf
Showing
3 changed files
with
19 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
command: git config --global url."https://${GITHUB_TOKEN}:[email protected]/LF-Engineering".insteadOf "https://github.com/LF-Engineering" | ||
- run: | ||
name: Build Executable | ||
command: make jira | ||
command: make | ||
- setup_remote_docker | ||
- persist_to_workspace: | ||
root: ./ | ||
|
@@ -34,16 +34,15 @@ jobs: | |
command: | | ||
eval "echo 'export AWS_ACCESS_KEY_ID=\$$AWS_ACCESS_KEY_ID_ENV_VAR'" >> $BASH_ENV | ||
eval "echo 'export AWS_SECRET_ACCESS_KEY=\$$AWS_SECRET_ACCESS_KEY_ENV_VAR'" >> $BASH_ENV | ||
eval "echo 'export AWS_ACCOUNT_ID=\$$AWS_ACCOUNT_ID_ENV_VAR'" >> $BASH_ENV | ||
eval "echo 'export AWS_DEFAULT_REGION=\$$AWS_REGION_ENV_VAR'" >> $BASH_ENV | ||
- run: | ||
name: Setup common environment variables | ||
command: | | ||
echo 'export FULL_IMAGE_NAME="${AWS_ACCOUNT_ID_ENV_VAR}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/insights-connector-jira:${TAG}"' >> $BASH_ENV | ||
echo 'export FULL_IMAGE_NAME="${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/insights-connector-jira:${TAG}"' >> $BASH_ENV | ||
- run: | ||
name: Authenticate ECR | ||
command: | | ||
aws ecr get-login-password | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID_ENV_VAR}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com | ||
aws ecr get-login-password | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com | ||
- run: | ||
name: setup the docker repository to be able to push image in aws (should succeed on first time & allowed to fail later) | ||
command: | | ||
|
@@ -62,59 +61,35 @@ jobs: | |
AWS_REGION_ENV_VAR: AWS_REGION_DEV | ||
AWS_ACCESS_KEY_ID_ENV_VAR: AWS_ACCESS_KEY_ID_DEV | ||
AWS_SECRET_ACCESS_KEY_ENV_VAR: AWS_SECRET_ACCESS_KEY_DEV | ||
AWS_ACCOUNT_ID_ENV_VAR: "395594542180" | ||
STAGE: dev | ||
TAG: latest | ||
|
||
deploy_test: | ||
<<: *deploy | ||
environment: | ||
AWS_ACCESS_KEY_ID_ENV_VAR: AWS_ACCESS_KEY_ID_TEST | ||
AWS_SECRET_ACCESS_KEY_ENV_VAR: AWS_SECRET_ACCESS_KEY_TEST | ||
AWS_ACCOUNT_ID_ENV_VAR: AWS_ACCOUNT_ID_TEST | ||
AWS_REGION_ENV_VAR: AWS_REGION_TEST | ||
STAGE: test | ||
TAG: test | ||
|
||
deploy_prod: | ||
<<: *deploy | ||
environment: | ||
AWS_ACCESS_KEY_ID_ENV_VAR: AWS_ACCESS_KEY_ID_PROD | ||
AWS_SECRET_ACCESS_KEY_ENV_VAR: AWS_SECRET_ACCESS_KEY_PROD | ||
AWS_ACCOUNT_ID_ENV_VAR: AWS_ACCOUNT_ID_PROD | ||
AWS_REGION_ENV_VAR: AWS_REGION_PROD | ||
STAGE: prod | ||
TAG: stable | ||
|
||
workflows: | ||
build-connector: | ||
jobs: | ||
- build | ||
- deploy_dev: | ||
requires: | ||
- build | ||
- build: | ||
filters: | ||
branches: | ||
only: main | ||
tags: | ||
ignore: /.*/ | ||
- approve_test: | ||
type: approval | ||
only: /.*/ | ||
- deploy_dev: | ||
context: | ||
- development | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
only: main | ||
tags: | ||
only: /^v\d+(\.\d+)?(\.\d+)?$/ | ||
- deploy_test: | ||
requires: | ||
- approve_test | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v\d+(\.\d+)?(\.\d+)?$/ | ||
- approve_prod: | ||
type: approval | ||
requires: | ||
|
@@ -125,6 +100,8 @@ workflows: | |
tags: | ||
only: /^v\d+(\.\d+)?(\.\d+)?$/ | ||
- deploy_prod: | ||
context: | ||
- production | ||
requires: | ||
- approve_prod | ||
filters: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters