Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 48 additions & 7 deletions .github/workflows/lcm-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,26 +293,67 @@ jobs:
group: infra1-runners-arc
labels: runners-small
needs: [ prepare-build, promote-to-stable ]
permissions:
id-token: write
contents: read
if: |
!cancelled() &&
!contains(needs.*.result, 'failure') &&
needs.prepare-build.outputs.images != '[]' &&
needs.prepare-build.outputs.images != '' &&
inputs.deploy
strategy:
max-parallel: 1
matrix:
cluster: [ na1, ca2, perf1, bom1, syd1, na3, eu1, fra1 ]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Register bricks to ${{ matrix.cluster }}
uses: ./.github/actions/rundeck
- name: Get required Vault secrets
uses: hashicorp/vault-action@v3
with:
server: '${{ secrets.RUNDECK_URL }}'
project: ${{ matrix.cluster }}-ansible
job-group: ansible/msf/hotfix
job-name: ${{ matrix.cluster }}_lcm_pipeline_component_tool
vault-url: ${{ secrets.VAULT_ADDRESS }}
url: ${{ secrets.VAULT_ADDRESS }}
method: jwt
path: jwt/github
role: ecr-ii-push
secrets: |
secret/data/v2/data-special/infra1-user-ecr-rw aws_ecr_access_key | AWS_ACCESS_KEY ;
secret/data/v2/data-special/infra1-user-ecr-rw aws_ecr_secret_key | AWS_SECRET_KEY ;
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ env.AWS_SECRET_KEY }}
aws-region: us-east-1
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'
- name: Backup current cluster tag as old
env:
ECR_URL: ${{ secrets.ECR_URL }}
run: |
crane cp \
"${ECR_URL}/stable/lcm-bricks:${{ needs.prepare-build.outputs.service_major_version }}-${{ matrix.cluster }}" \
"${ECR_URL}/stable/lcm-bricks:${{ needs.prepare-build.outputs.service_major_version }}-${{ matrix.cluster }}-old" \
|| echo "No existing cluster tag to back up, skipping"
- name: Apply cluster-specific tag
env:
ECR_URL: ${{ secrets.ECR_URL }}
run: |
crane cp \
"${ECR_URL}/stable/lcm-bricks:${{ needs.prepare-build.outputs.service_major_version }}" \
"${ECR_URL}/stable/lcm-bricks:${{ needs.prepare-build.outputs.service_major_version }}-${{ matrix.cluster }}"
# - name: Register bricks to ${{ matrix.cluster }}
# uses: ./.github/actions/rundeck
# with:
# server: '${{ secrets.RUNDECK_URL }}'
# project: ${{ matrix.cluster }}-ansible
# job-group: ansible/msf/hotfix
# job-name: ${{ matrix.cluster }}_lcm_pipeline_component_tool
# vault-url: ${{ secrets.VAULT_ADDRESS }}
# - name: Wait for stabilization
# run: sleep 900

create-auto-merge-prod-pr:
needs: [ prepare-build, build-helmreleases, register-bricks-prod ]
Expand Down
Loading