Skip to content

Commit

Permalink
chore: ip and host name are hidden (#235)
Browse files Browse the repository at this point in the history
* chore: ip and host name are hidden

* chore: uncommenting rc notifs
  • Loading branch information
NithinKuruba authored Nov 22, 2022
1 parent 78277a0 commit 58f89ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 31 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/siteminder-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,22 @@ on:
environment:
description: 'Environment under test'
required: true
default: 'prod'
default: 'PROD'
type: choice
options: ['dev', 'test', 'prod']
options: ['DEV', 'TEST', 'PROD']
cluster:
description: 'OCP'
required: true
default: 'gold'
default: 'GOLD'
type: choice
options: ['silver', 'gold']
options: ['SILVER', 'GOLD']
jobs:
matrix-prep:
name: Generate matrix
runs-on: ubuntu-20.04
outputs:
datacenters: ${{ steps.set-matrix.outputs.datacenters }}
hostname: ${{ steps.set-matrix.outputs.hostname }}
steps:
- name: Fetch environment specific parameters
id: set-matrix
run: |
datacenters=$(echo "${{ secrets.SITEMINDER_TESTS_DATACENTERS }}" | jq '."${{ github.event.inputs.environment }}".datacenters')
hostname=$(echo "${{ secrets.SITEMINDER_TESTS_DATACENTERS }}" | jq -r '."${{ github.event.inputs.environment }}".hostname')
echo ::set-output name=datacenters::{\"include\":$(echo $datacenters)}
echo ::set-output name=hostname::$(echo "$hostname")
run-siteminder-tests:
name: ${{ matrix.name }}
runs-on: ubuntu-20.04
needs: matrix-prep
strategy:
matrix: ${{ fromJson(needs.matrix-prep.outputs.datacenters) }}
matrix:
name: ['KAMLOOPS', 'CALGARY']
max-parallel: 1
steps:
- name: Check out repository
Expand All @@ -50,7 +36,7 @@ jobs:
- name: Set up docker buildx
uses: docker/setup-buildx-action@v2
- name: Cache docker layers
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/.buildx-test-cache
key: ${{ runner.os }}-buildx-test-${{ github.sha }}
Expand All @@ -69,18 +55,20 @@ jobs:
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=${{ needs.matrix-prep.outputs.hostname }}:${{ matrix.ip }} \
--add-host=${{ secrets[env.HOST_ENTRY] }} \
siteminder-tests
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.inputs.cluster }}-${{ github.event.inputs.environment }}-${{ matrix.name }}-results
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()
Expand Down
7 changes: 1 addition & 6 deletions cy-siteminder-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@

**Note**: The below secrets are used by `siteminder-tests.yml` workflow to run the tests. Make sure these secrets are available as github action secrets before running the github action. These secrets are also stored under a secret `siteminder-tests` at `eb75ad-tools` namespace of gold cluster

- `SITEMINDER_TESTS_DATACENTERS` stores a json payload in below format

```json
{\"<ENVIRONMENT>\":{\"datacenters\":[{\"name\":\"<DATACENTER>\",\"ip\":\"<DATACENTER-IP>\"},{\"name\":\"<DATACENTER>\",\"ip\":\"<DATACENTER-IP>\"}],\"hostname\":\"<HOSTNAME>\"}}
```

- `SITEMINDER_TESTS_DATACENTERS_HOST_ENTRY` stores datacenter specific hostname and ip address
- `SITEMINDER_TESTS_ENV` stores all the key-value pairs from `.env.example`

### Tools
Expand Down

0 comments on commit 58f89ea

Please sign in to comment.