Update SecurityConfig.java #40
Workflow file for this run
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: end-to-end tests | |
on: | |
pull_request: | |
workflow_call: | |
workflow_dispatch: # Allow manual trigger | |
# Ensure we have only one e2e test running at a time | |
concurrency: | |
group: e2e-test | |
jobs: | |
test: | |
runs-on: self-hosted | |
env: | |
# Keystore location must be full path for spring framework | |
AB2D_BFD_KEYSTORE_LOCATION: "${{ github.workspace }}/opt/ab2d/ab2d_bfd_keystore" | |
AB2D_V2_ENABLED: 'true' | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install Maven 3.6.3 | |
run: | | |
export PATH="$PATH:/opt/maven/bin" | |
echo "PATH=$PATH" >> $GITHUB_ENV | |
if mvn -v; then echo "Maven already installed" && exit 0; else echo "Installing Maven"; fi | |
tmpdir="$(mktemp -d)" | |
curl -LsS https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | tar xzf - -C "$tmpdir" | |
sudo rm -rf /opt/maven | |
sudo mv "$tmpdir/apache-maven-3.6.3" /opt/maven | |
- name: Set env vars from AWS params in management account | |
uses: cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main | |
env: | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
with: | |
params: | | |
ARTIFACTORY_URL=/artifactory/url | |
ARTIFACTORY_USER=/artifactory/user | |
ARTIFACTORY_PASSWORD=/artifactory/password | |
- name: Assume role in AB2D impl account | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-region: ${{ vars.AWS_REGION }} | |
role-to-assume: arn:aws:iam::${{ secrets.IMPL_ACCOUNT_ID }}:role/delegatedadmin/developer/ab2d-test-github-actions | |
- name: Set env vars from AWS params in impl account | |
uses: cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main | |
env: | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
with: | |
params: | | |
AB2D_BFD_KEYSTORE_PASSWORD=/bfd/keystore-password | |
OKTA_CLIENT_ID=/okta/test-pdp-100-id | |
OKTA_CLIENT_PASSWORD=/okta/test-pdp-100-secret | |
SECONDARY_USER_OKTA_CLIENT_ID=/okta/test-pdp-1000-id | |
SECONDARY_USER_OKTA_CLIENT_PASSWORD=/okta/test-pdp-1000-secret | |
- name: Create opt/ab2d directory and download keystore | |
run: | | |
mkdir -p opt/ab2d | |
aws s3 cp s3://ab2d-east-impl-main/ab2d_imp_keystore $AB2D_BFD_KEYSTORE_LOCATION | |
test -f $AB2D_BFD_KEYSTORE_LOCATION && echo "created keystore file" | |
- name: Run e2e-bfd-test | |
run: | | |
mvn test -s settings.xml -pl e2e-bfd-test -am -Dtest=EndToEndBfdTests -DfailIfNoTests=false -Dusername=$ARTIFACTORY_USER -Dpassword=$ARTIFACTORY_PASSWORD -Drepository_url=$ARTIFACTORY_URL --no-transfer-progress | |
- name: Run e2e-test | |
env: | |
E2E_ENVIRONMENT: 'IMPL' | |
run: | | |
mvn test -s settings.xml -pl e2e-test -am -Dtest=TestRunner -DfailIfNoTests=false -Dusername=$ARTIFACTORY_USER -Dpassword=$ARTIFACTORY_PASSWORD -Drepository_url=$ARTIFACTORY_URL --no-transfer-progress |