@@ -86,11 +86,11 @@ jobs:
86
86
skip_update_check = true
87
87
88
88
[__e2e]
89
- org_id = '${{ secrets.MONGODB_ATLAS_ORG_ID }} '
90
- project_id = '${{ secrets.MONGODB_ATLAS_PROJECT_ID }} '
91
- public_api_key = '${{ secrets.MONGODB_ATLAS_PROJECT_ID }} '
92
- private_api_key = '${{ secrets.MONGODB_ATLAS_PRIVATE_API_KEY }} '
93
- ops_manager_url = '${{ secrets.MONGODB_ATLAS_OPS_MANAGER_URL }} '
89
+ org_id = 'a0123456789abcdef012345a '
90
+ project_id = 'b0123456789abcdef012345b '
91
+ public_api_key = 'ABCDEF01 '
92
+ private_api_key = '12345678-abcd-ef01-2345-6789abcdef01 '
93
+ ops_manager_url = 'http://localhost:8080/ '
94
94
service = 'cloud'
95
95
telemetry_enabled = false
96
96
output = 'plaintext'
@@ -104,9 +104,18 @@ jobs:
104
104
service = 'cloud'
105
105
telemetry_enabled = false
106
106
output = 'plaintext'
107
- EOF
107
+ MONGODB_ATLAS_ORG_ID : ${{ secrets.MONGODB_ATLAS_ORG_ID }}
108
+ MONGODB_ATLAS_PROJECT_ID : ${{ secrets.MONGODB_ATLAS_PROJECT_ID }}
109
+ MONGODB_ATLAS_PRIVATE_API_KEY : ${{ secrets.MONGODB_ATLAS_PRIVATE_API_KEY }}
110
+ MONGODB_ATLAS_PUBLIC_API_KEY : ${{ secrets.MONGODB_ATLAS_PUBLIC_API_KEY }}
111
+ MONGODB_ATLAS_OPS_MANAGER_URL : ${{ secrets.MONGODB_ATLAS_OPS_MANAGER_URL }}
108
112
run : |
109
113
echo "$CONFIG_CONTENT" > "$CONFIG_PATH"
114
+ ./bin/atlas config set org_id "$MONGODB_ATLAS_ORG_ID" -P __e2e
115
+ ./bin/atlas config set project_id "$MONGODB_ATLAS_PROJECT_ID" -P __e2e
116
+ ./bin/atlas config set public_api_key "$MONGODB_ATLAS_PUBLIC_API_KEY" -P __e2e
117
+ ./bin/atlas config set private_api_key "$MONGODB_ATLAS_PRIVATE_API_KEY" -P __e2e
118
+ ./bin/atlas config set ops_manager_url "$MONGODB_ATLAS_OPS_MANAGER_URL" -P __e2e
110
119
- run : make e2e-test
111
120
env :
112
121
TEST_CMD : gotestsum --junitfile e2e-tests.xml --format standard-verbose --
@@ -211,7 +220,7 @@ jobs:
211
220
paths : e2e-tests.xml
212
221
commit :
213
222
runs-on : ubuntu-latest
214
- if : always () && github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'update-snapshots'
223
+ if : success () && github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'update-snapshots'
215
224
needs : update-tests
216
225
steps :
217
226
- name : set Apix Bot token
@@ -243,6 +252,25 @@ jobs:
243
252
with :
244
253
github_token : ${{ steps.app-token.outputs.token }}
245
254
labels : update-snapshots
255
+ comment :
256
+ runs-on : ubuntu-latest
257
+ if : failure() && github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'update-snapshots'
258
+ needs : update-tests
259
+ steps :
260
+ - name : set Apix Bot token
261
+ id : app-token
262
+ uses : mongodb/apix-action/token@6c3fde402c21942fa46cde003f190c2b23c59530
263
+ with :
264
+ app-id : ${{ secrets.APIXBOT_APP_ID }}
265
+ private-key : ${{ secrets.APIXBOT_APP_PEM }}
266
+ - uses : actions-ecosystem/action-remove-labels@v1
267
+ with :
268
+ github_token : ${{ steps.app-token.outputs.token }}
269
+ labels : update-snapshots
270
+ - uses : marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405
271
+ with :
272
+ header : test
273
+ message : " Failed to update test snapshots."
246
274
pr :
247
275
runs-on : ubuntu-latest
248
276
if : success() && github.event_name != 'pull_request'
0 commit comments