chore(cd): update spinnaker-orca version to 2024.0.0-20240730185053.master #1832
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 Or Plugins File Changed | |
id: check_stack | |
env: | |
BRANCH_NAME: ${{ github.event.pull_request.base.ref }} | |
run: | | |
diffStack=$(git diff origin/$BRANCH_NAME HEAD stack.yml) | |
diffPlugins=$(git diff origin/$BRANCH_NAME HEAD plugins.yml) | |
if [[ -z "$diffStack" && -z "$diffPlugins" ]]; 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' | |
id: skip_check | |
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: Get ArtifactId From Plugins | |
if: steps.check_stack.outputs.changed == 'true' | |
id: plugins | |
run: | | |
plugins=( $(yq e '.plugins | to_entries | .[] | .key + "," + .value.image.repository + ":" + .value.image.tag' plugins.yml ) ) | |
for plugin in "${plugins[@]}"; do | |
repoTag=(${plugin//,/ }) | |
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-oss-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 }},deck_image:${{ steps.services.outputs.deck-armory }},dinghy_image:${{ steps.services.outputs.dinghy }},echo_image:${{ steps.services.outputs.echo }},fiat_image:${{ steps.services.outputs.fiat }},front50_image:${{ steps.services.outputs.front50 }},gate_image:${{ steps.services.outputs.gate }},igor_image:${{ steps.services.outputs.igor }},kayenta_image:${{ steps.services.outputs.kayenta }},orca_image:${{ steps.services.outputs.orca }},rosco_image:${{ steps.services.outputs.rosco }},terraformer_image:${{ steps.services.outputs.terraformer }},armory_ext_plugin_image:${{ steps.plugins.outputs.armory-ext }}' | |
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: 2100000 | |
- 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 }} | |
- uses: kceb/pull-request-url-action@v1 | |
if: ${{ steps.check_stack.outputs.changed == 'true' && failure() }} | |
id: pr-url | |
- 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: ${{ steps.pr-url.outputs.url }}' | |
SLACK_TITLE: E2E Test Alert | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |