Skip to content

Commit

Permalink
works?
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandramartinez committed Sep 19, 2024
1 parent 4f58d38 commit 7bc2f6d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ on:
branches: [ test ]

env:
CLIENT_ID: ${{ secrets.CONNECTED_APP_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CONNECTED_APP_CLIENT_SECRET }}
ANYPOINT_CLIENT_ID: ${{ secrets.CONNECTED_APP_CLIENT_ID }}
ANYPOINT_CLIENT_SECRET: ${{ secrets.CONNECTED_APP_CLIENT_SECRET }}
REST_API_ARTIFACT_ID: squirrel
API_MANAGER_API_ID: 19940258

jobs:
test:
Expand All @@ -33,17 +34,19 @@ jobs:
- name: Install Anypoint CLI
run: |
npm install -g anypoint-cli-v4
- name: Authenticate to Anypoint CLI
- name: Set ANYPOINT_ORG
run: |
anypoint-cli-v4 conf client_id $CLIENT_ID
anypoint-cli-v4 conf client_secret $CLIENT_SECRET
- name: Set ORG_ID
echo "ANYPOINT_ORG=$(mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout)" >> $GITHUB_ENV
- name: Set ANYPOINT_ENV
run: |
echo "ORG_ID=$(mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout)" >> $GITHUB_ENV
echo "ANYPOINT_ENV=$(mvn help:evaluate -Dexpression=env -q -DforceStdout)"
- name: Set REST_API_VERSION
run: |
echo "REST_API_VERSION=$(mvn dependency:list -DincludeArtifactIds=$REST_API_ARTIFACT_ID \
--settings .maven/settings.xml \
-DskipMunitTests \
-Dclient.id="$CLIENT_ID" \
-Dclient.secret="$CLIENT_SECRET" | grep ":$REST_API_ARTIFACT_ID:" | grep -Eo "[0-9]+[.][0-9]+[.][0-9]+")" >> $GITHUB_ENV
-Dclient.id="$ANYPOINT_CLIENT_ID" \
-Dclient.secret="$ANYPOINT_CLIENT_SECRET" | grep ":$REST_API_ARTIFACT_ID:" | grep -Eo "[0-9]+[.][0-9]+[.][0-9]+")" >> $GITHUB_ENV
- name: API Manager - Change specification version
run: |
anypoint-cli-v4 api-mgr:api:change-specification $API_MANAGER_API_ID REST_API_VERSION

0 comments on commit 7bc2f6d

Please sign in to comment.