|
22 | 22 | type: choice |
23 | 23 | description: Select the Apigee proxy environment |
24 | 24 | options: |
25 | | - - internal-dev # Add rest later |
| 25 | + - internal-dev |
| 26 | + - int |
| 27 | + - ref |
| 28 | + - prod |
26 | 29 | create_mns_subscription: |
27 | 30 | description: Create an MNS Subscription. Only available in dev |
28 | 31 | required: false |
|
34 | 37 | options: |
35 | 38 | - dev |
36 | 39 | - preprod |
| 40 | + - prod |
37 | 41 | sub_environment: |
38 | 42 | type: string |
39 | 43 | description: Set the sub environment name e.g. pr-xxx, or green/blue in higher environments |
|
71 | 75 | - name: Terraform Plan |
72 | 76 | working-directory: ${{ vars.TERRAFORM_DIR_PATH }} |
73 | 77 | run: make plan apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }} |
74 | | - # TODO - save the plan and use it in the apply step |
75 | 78 |
|
76 | 79 | terraform-apply: |
77 | 80 | needs: terraform-plan |
@@ -125,86 +128,3 @@ jobs: |
125 | 128 | poetry install --no-root |
126 | 129 | echo "Subscribing SQS to MNS for notifications..." |
127 | 130 | make subscribe |
128 | | - # TODO - replace with modular e2e test workflow |
129 | | - # e2e-tests: |
130 | | - # if: ${{ vars.RUN_E2E == 'true' && inputs.sub_environment == vars.ACTIVE_ENVIRONMENT }} |
131 | | - # needs: terraform-apply |
132 | | - # runs-on: ubuntu-latest |
133 | | - # permissions: |
134 | | - # id-token: write |
135 | | - # contents: read |
136 | | - # steps: |
137 | | - # - name: Checkout |
138 | | - # uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
139 | | - |
140 | | - # - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a |
141 | | - # with: |
142 | | - # aws-region: eu-west-2 |
143 | | - # role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/auto-ops |
144 | | - # role-session-name: github-actions |
145 | | - |
146 | | - # - uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd |
147 | | - # with: |
148 | | - # terraform_version: "1.12.2" |
149 | | - |
150 | | - # - name: Terraform Init |
151 | | - # working-directory: ${{ vars.TERRAFORM_DIR_PATH }} |
152 | | - # run: make init apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }} |
153 | | - |
154 | | - # - name: Set up Python |
155 | | - # uses: actions/setup-python@v5 |
156 | | - # with: |
157 | | - # python-version: "3.11" |
158 | | - |
159 | | - # - name: Install Poetry |
160 | | - # run: | |
161 | | - # curl -sSL https://install.python-poetry.org | python3 - --version 2.1.4 |
162 | | - # echo "$HOME/.local/bin" >> $GITHUB_PATH |
163 | | - # poetry --version |
164 | | - |
165 | | - # - name: Set Poetry to use Python 3.11 |
166 | | - # working-directory: ${{ vars.E2E_DIR_PATH }} |
167 | | - # run: | |
168 | | - # poetry env use $(which python3.11) |
169 | | - |
170 | | - # - name: Install dependencies with Poetry |
171 | | - # working-directory: ${{ vars.E2E_DIR_PATH }} |
172 | | - # run: | |
173 | | - # poetry install --no-root |
174 | | - |
175 | | - # - name: Install oathtool |
176 | | - # run: sudo apt-get update && sudo apt-get install -y oathtool |
177 | | - |
178 | | - # - name: Get JWT token for apigee |
179 | | - # env: |
180 | | - # APIGEE_USERNAME: ${{ vars.APIGEE_USERNAME }} |
181 | | - # APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }} |
182 | | - # APIGEE_OAUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }} |
183 | | - # APIGEE_OTP_SECRET: ${{ secrets.APIGEE_OTP_KEY }} |
184 | | - # run: | |
185 | | - # CODE=$(oathtool --totp -b "$APIGEE_OTP_SECRET") |
186 | | - # echo "::add-mask::$CODE" |
187 | | - # echo "Requesting access token from Apigee..." |
188 | | - # response=$(curl -s -X POST "https://login.apigee.com/oauth/token" \ |
189 | | - # -H "Content-Type: application/x-www-form-urlencoded" \ |
190 | | - # -H "Accept: application/json;charset=utf-8" \ |
191 | | - # -H "Authorization: Basic $APIGEE_BASIC_AUTH_TOKEN" \ |
192 | | - # -d "username=$APIGEE_USERNAME&password=$APIGEE_PASSWORD&mfa_token=$CODE&grant_type=password") |
193 | | - # token=$(echo "$response" | jq -e -r '.access_token') |
194 | | - # if [[ -z "$token" ]]; then |
195 | | - # echo "Failed to retrieve access token" |
196 | | - # exit 1 |
197 | | - # fi |
198 | | - # echo "::add-mask::$token" |
199 | | - # echo "APIGEE_ACCESS_TOKEN=$token" >> $GITHUB_ENV |
200 | | - |
201 | | - # - name: Run e2e tests |
202 | | - # working-directory: ${{ vars.E2E_DIR_PATH }} |
203 | | - # env: |
204 | | - # APIGEE_ACCESS_TOKEN: ${{ env.APIGEE_ACCESS_TOKEN }} |
205 | | - # APIGEE_USERNAME: [email protected] |
206 | | - # run: | |
207 | | - # export APIGEE_ENVIRONMENT=internal-dev |
208 | | - # export PROXY_NAME=immunisation-fhir-api-${{ inputs.sub_environment }} |
209 | | - # export SERVICE_BASE_PATH=immunisation-fhir-api/FHIR/R4-${{ inputs.sub_environment }} |
210 | | - # make run-immunization |
0 commit comments