chore(cd): update clouddriver-armory version to 2024.12.12.18.19.22.master #5285
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
name: Run E2E Tests | |
on: | |
pull_request: | |
branches: | |
- master | |
- 'release-**.x' | |
jobs: | |
create_ephemeral_spinnaker_and_run_tests: | |
name: create-destroy ephemeral spinnaker and run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- name: Check If Stack File Changed | |
id: check_stack | |
env: | |
BRANCH_NAME: ${{ github.event.pull_request.base.ref }} | |
run: | | |
diff=$(git diff origin/$BRANCH_NAME HEAD stack.yml) | |
if [ -z "$diff" ]; then | |
echo "##[set-output name=changed;]false" | |
else | |
echo "##[set-output name=changed;]true" | |
fi | |
- name: Cancel checks out-of-date | |
if: steps.check_stack.outputs.changed == 'true' | |
uses: fkirc/skip-duplicate-actions@v4 | |
with: | |
cancel_others: 'true' | |
- name: Wait For Other Tests To Finish | |
if: steps.check_stack.outputs.changed == 'true' | |
uses: softprops/turnstyle@v1 | |
with: | |
same-branch-only: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.ASTROLABE_GITHUB_TOKEN }} | |
- name: Give Github time to merge new changes if exist | |
if: steps.check_stack.outputs.changed == 'true' | |
run: sleep 10s | |
shell: bash | |
- name: Get ArtifactId From Stack Services | |
if: steps.check_stack.outputs.changed == 'true' | |
id: services | |
run: | | |
services=( $(yq e '.services | to_entries | .[] | .key + "," + .value.image.repository + ":" + .value.image.tag' stack.yml ) ) | |
for service in "${services[@]}"; do | |
repoTag=(${service//,/ }) | |
echo "##[set-output name=${repoTag[0]};]${repoTag[1]}" | |
done | |
- name: Trigger Ephemeral Spinnaker And Tests | |
if: steps.check_stack.outputs.changed == 'true' | |
uses: armory-io/spin-trigger-pipeline-action@master | |
id: trigger_tests | |
with: | |
baseUrl: https://spinnaker-api.internal.armory.io:8443/api/v1 | |
source: create-ephemeral-spinnaker | |
parameters: 'namespace:${{ github.event.pull_request.head.sha }},sha:${{ github.event.pull_request.head.sha }},branch_name:${{ github.event.pull_request.base.ref }},clouddriver_image:${{ steps.services.outputs.clouddriver-armory }},deck_image:${{ steps.services.outputs.deck-armory }},dinghy_image:${{ steps.services.outputs.dinghy }},echo_image:${{ steps.services.outputs.echo-armory }},fiat_image:${{ steps.services.outputs.fiat-armory }},front50_image:${{ steps.services.outputs.front50-armory }},gate_image:${{ steps.services.outputs.gate-armory }},igor_image:${{ steps.services.outputs.igor-armory }},kayenta_image:${{ steps.services.outputs.kayenta-armory }},orca_image:${{ steps.services.outputs.orca-armory }},rosco_image:${{ steps.services.outputs.rosco-armory }},terraformer_image:${{ steps.services.outputs.terraformer }},pr_url:${{ github.event.pull_request.html_url }}' | |
crtFile: ${{ secrets.STAGING_CLIENT_CERTIFICATE }} | |
keyFile: ${{ secrets.STAGING_CLIENT_PRIVATE_KEY }} | |
- name: Watch Pipeline Execution For E2E Tests | |
if: steps.check_stack.outputs.changed == 'true' | |
uses: armory-io/spin-wait-status-action@master | |
with: | |
baseUrl: https://spinnaker-api.internal.armory.io:8443/api/v1 | |
application: dynamo-armory-enterprise-testing | |
eventId: ${{ steps.trigger_tests.outputs.eventId }} | |
crtFile: ${{ secrets.STAGING_CLIENT_CERTIFICATE }} | |
keyFile: ${{ secrets.STAGING_CLIENT_PRIVATE_KEY }} | |
timeout: 3600000 | |
- name: Enable automerge in PR | |
if: ${{ steps.check_stack.outputs.changed == 'true' && success() }} | |
uses: alexwilson/enable-github-automerge-action@main | |
with: | |
github-token: "${{ secrets.ASTROLABE_GITHUB_TOKEN }}" | |
- name: Destroy Ephemeral Spinnaker | |
if: ${{ steps.check_stack.outputs.changed == 'true' && !cancelled() }} | |
uses: armory-io/spin-trigger-pipeline-action@master | |
with: | |
baseUrl: https://spinnaker-api.internal.armory.io:8443/api/v1 | |
source: destroy-ephemeral-spinnaker | |
parameters: 'namespace:${{ github.event.pull_request.head.sha }},branch_name:${{ github.event.pull_request.base.ref }}' | |
crtFile: ${{ secrets.STAGING_CLIENT_CERTIFICATE }} | |
keyFile: ${{ secrets.STAGING_CLIENT_PRIVATE_KEY }} | |
- name: build json with labels | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
uses: jsdaniell/create-json@v1.2.1 | |
with: | |
name: "pr-info.json" | |
json: ${{ toJson(github.event.pull_request) }} | |
- name: Extract serviceName from pr-info.json | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
uses: sergeysova/jq-action@v2 | |
id: serviceKey | |
with: | |
cmd: jq -r '[.labels[].name | select(. != "autoMerge") | select(. != "stackUpdate")][0]' pr-info.json | |
- name: Extract serviceType | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
uses: mikefarah/yq@master | |
id: serviceType | |
with: | |
cmd: yq '.services.["${{ steps.serviceKey.outputs.value }}"].vcs.repo.type' stack.yml | |
- name: Extract serviceOrg | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
uses: mikefarah/yq@master | |
id: serviceOrg | |
with: | |
cmd: yq '.services.["${{ steps.serviceKey.outputs.value }}"].vcs.repo.orgName' stack.yml | |
- name: Extract serviceRepo | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
uses: mikefarah/yq@master | |
id: serviceRepo | |
with: | |
cmd: yq '.services.["${{ steps.serviceKey.outputs.value }}"].vcs.repo.repoName' stack.yml | |
- name: Extract serviceSha | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
uses: mikefarah/yq@master | |
id: serviceSha | |
with: | |
cmd: yq '.services.["${{ steps.serviceKey.outputs.value }}"].vcs.sha' stack.yml | |
- name: Send Slack Notification | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: eng-release-process-alerts | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: 'Error found in the e2e tests suit for PR: ${{ github.event.pull_request.html_url }} Bathymetric: https://bathymetric.dynamo-prod.eng.armory.io/?branchName=${{ github.event.pull_request.base.ref }}&selectedStackPipelineId=${{ steps.serviceType.outputs.result }}:${{ steps.serviceOrg.outputs.result }}:${{ steps.serviceRepo.outputs.result }}:${{ steps.serviceSha.outputs.result }}' | |
SLACK_TITLE: E2E Test Alert | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |