Skip to content

Commit

Permalink
remove hardcoded values from pipeline configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelezovartem committed May 16, 2024
1 parent 2eab3ef commit c5781ab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/sub_deploy_to_beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ env:
KOSLI_FLOW: ${{ vars.KOSLI_FLOW }} # runner-ci
KOSLI_TRAIL: ${{ github.sha }}
SERVICE_NAME: ${{ github.event.repository.name }} # runner
AWS_ECR_ID: ${{ vars.AWS_ECR_ID }}
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID_BETA }}

jobs:

Expand All @@ -34,12 +37,12 @@ jobs:
- name: Prepare outputs for fivexl deployment workflow
id: vars
run: |
echo "service_name=${{ env.SERVICE_NAME }}" >> ${GITHUB_OUTPUT}
echo "image_tag=${{ inputs.IMAGE_TAG }}" >> ${GITHUB_OUTPUT}
echo "aws_account_id=244531986313" >> ${GITHUB_OUTPUT}
echo "ecr_registry=244531986313.dkr.ecr.eu-central-1.amazonaws.com" >> ${GITHUB_OUTPUT}
echo "aws_region=eu-central-1" >> ${GITHUB_OUTPUT}
echo "gh_actions_iam_role_name=gh_actions_services" >> ${GITHUB_OUTPUT}
echo "service_name=${{ env.SERVICE_NAME }}" >> ${GITHUB_OUTPUT}
echo "image_tag=${{ inputs.IMAGE_TAG }}" >> ${GITHUB_OUTPUT}
echo "aws_account_id=${{ env.AWS_ACCOUNT_ID }}" >> ${GITHUB_OUTPUT}
echo "ecr_registry=${{ env.AWS_ECR_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com" >> ${GITHUB_OUTPUT}
echo "aws_region=${{ env.AWS_REGION }}" >> ${GITHUB_OUTPUT}
echo "gh_actions_iam_role_name=gh_actions_services" >> ${GITHUB_OUTPUT}
deploy-to-aws-beta:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/sub_deploy_to_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ env:
KOSLI_FLOW: ${{ vars.KOSLI_FLOW }} # runner-ci
KOSLI_TRAIL: ${{ github.sha }}
SERVICE_NAME: ${{ github.event.repository.name }} # runner
AWS_ECR_ID: ${{ vars.AWS_ECR_ID }}
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID_PROD }}

jobs:

Expand All @@ -34,12 +37,12 @@ jobs:
- name: Prepare outputs for fivexl deployment workflow
id: vars
run: |
echo "service_name=${{ env.SERVICE_NAME }}" >> ${GITHUB_OUTPUT}
echo "image_tag=${{ inputs.IMAGE_TAG }}" >> ${GITHUB_OUTPUT}
echo "aws_account_id=274425519734" >> ${GITHUB_OUTPUT}
echo "ecr_registry=244531986313.dkr.ecr.eu-central-1.amazonaws.com" >> ${GITHUB_OUTPUT}
echo "aws_region=eu-central-1" >> ${GITHUB_OUTPUT}
echo "gh_actions_iam_role_name=gh_actions_services" >> ${GITHUB_OUTPUT}
echo "service_name=${{ env.SERVICE_NAME }}" >> ${GITHUB_OUTPUT}
echo "image_tag=${{ inputs.IMAGE_TAG }}" >> ${GITHUB_OUTPUT}
echo "aws_account_id=${{ env.AWS_ACCOUNT_ID }}" >> ${GITHUB_OUTPUT}
echo "ecr_registry=${{ env.AWS_ECR_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com" >> ${GITHUB_OUTPUT}
echo "aws_region=${{ env.AWS_REGION }}" >> ${GITHUB_OUTPUT}
echo "gh_actions_iam_role_name=gh_actions_services" >> ${GITHUB_OUTPUT}
deploy-to-aws-prod:
needs: [variables]
Expand Down

0 comments on commit c5781ab

Please sign in to comment.