Run siteminder tests to validate saml payload #1940
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 siteminder tests to validate saml payload | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment under test' | |
required: true | |
default: 'PROD' | |
type: choice | |
options: ['DEV', 'TEST', 'PROD'] | |
cluster: | |
description: 'OCP' | |
required: true | |
default: 'GOLD' | |
type: choice | |
options: ['GOLD', 'SILVER'] | |
jobs: | |
run-siteminder-tests: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
name: ['KAMLOOPS', 'CALGARY'] | |
max-parallel: 1 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Generate env file | |
run: | | |
cd ${{ github.workspace }}/cy-siteminder-tests | |
echo "${{ secrets.SITEMINDER_TESTS_ENV }}" | base64 --decode > .env | |
- name: Set up docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-test-cache | |
key: ${{ runner.os }}-buildx-test-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-buildx-test- | |
- name: Build docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: cy-siteminder-tests/ | |
push: false | |
load: true | |
tags: siteminder-tests | |
cache-from: type=local,src=/tmp/.buildx-test-cache | |
cache-to: type=local,dest=/tmp/.buildx-test-cache-new | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-test-cache | |
mv /tmp/.buildx-test-cache-new /tmp/.buildx-test-cache | |
- name: Run siteminder tests | |
env: | |
HOST_ENTRY: ${{ github.event.inputs.environment }}_IDIM_${{ matrix.name }}_HOST | |
run: | | |
cd ${{ github.workspace }}/cy-siteminder-tests | |
docker run --rm -e ENVIRONMENT=${{ github.event.inputs.environment }} \ | |
-e CLUSTER=${{ github.event.inputs.cluster }} \ | |
-v $(pwd)/results:/e2e/results \ | |
--add-host=${{ secrets[env.HOST_ENTRY] }} \ | |
siteminder-tests | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.inputs.cluster }}-${{ github.event.inputs.environment }}-${{ matrix.name }}-RESULTS | |
path: ${{ github.workspace }}/cy-siteminder-tests/results | |
- name: Rocket.Chat Notification | |
if: failure() | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: ${{ secrets.SSO_ALERTS }} | |
method: 'POST' | |
customHeaders: '{"Content-Type": "application/json"}' | |
data: '{"text": "Siteminder Tests Failed! @jsharman @jlanglois @Marco @nithinshekar.kuruba", "attachments": [{"color": "#FF0000","author_name": "${{ github.actor }}", "title": "Failed test", "title_link": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", "text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", "fields": [{"title": "Environment", "value": "${{ github.event.inputs.environment }}", "short": false}, {"title": "Cluster", "value": "${{ github.event.inputs.cluster }}", "short": false}]}]}' |