|
2 | 2 | name: Update E2E Tests Snapshots |
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
5 | | - pull_request: |
| 5 | + schedule: |
| 6 | + - cron: 0 5 * * 1-5 # weekdays at 5:00 AM UTC |
6 | 7 | jobs: |
7 | 8 | update-tests: |
8 | 9 | runs-on: ubuntu-latest |
@@ -188,77 +189,77 @@ jobs: |
188 | 189 | name: snapshots |
189 | 190 | path: test/e2e/.snapshots |
190 | 191 | include-hidden-files: true |
191 | | - # - name: Find JIRA ticket |
192 | | - # id: find |
193 | | - # uses: mongodb/apix-action/find-jira@dd1d8b713effb9ac4972a3318b8e2f03b8a6d8ce |
194 | | - # with: |
195 | | - # token: ${{ secrets.JIRA_API_TOKEN }} |
196 | | - # jql: project = CLOUDP AND status NOT IN (Closed, Resolved) AND summary ~ "Update Test Snapshots" |
197 | | - # - name: Set JIRA ticket (find) |
198 | | - # if: steps.find.outputs.found == 'true' |
199 | | - # run: | |
200 | | - # echo "JIRA_KEY=${{steps.find.outputs.issue-key}}" >> "$GITHUB_ENV" |
201 | | - # - name: Create JIRA ticket |
202 | | - # uses: mongodb/apix-action/create-jira@dd1d8b713effb9ac4972a3318b8e2f03b8a6d8ce |
203 | | - # id: create |
204 | | - # if: steps.find.outputs.found == 'false' |
205 | | - # with: |
206 | | - # token: ${{ secrets.JIRA_API_TOKEN }} |
207 | | - # project-key: CLOUDP |
208 | | - # summary: "[AtlasCLI] Update Test Snapshots" |
209 | | - # issuetype: Story |
210 | | - # description: Update Test Snapshots |
211 | | - # components: AtlasCLI |
212 | | - # assignee: ${{ secrets.ASSIGNEE_JIRA_TICKET }} |
213 | | - # extra-data: | |
214 | | - # { |
215 | | - # "fields": { |
216 | | - # "fixVersions": [ |
217 | | - # { |
218 | | - # "id": "41805" |
219 | | - # } |
220 | | - # ], |
221 | | - # "customfield_12751": [ |
222 | | - # { |
223 | | - # "id": "22223" |
224 | | - # } |
225 | | - # ], |
226 | | - # "customfield_10257": { |
227 | | - # "id": "11861" |
228 | | - # } |
229 | | - # } |
230 | | - # } |
231 | | - # - name: Set JIRA ticket (create) |
232 | | - # if: steps.find.outputs.found == 'false' |
233 | | - # run: | |
234 | | - # echo "JIRA_KEY=${{steps.create.outputs.issue-key}}" >> "$GITHUB_ENV" |
235 | | - # - name: set Apix Bot token |
236 | | - # id: app-token |
237 | | - # uses: mongodb/apix-action/token@dd1d8b713effb9ac4972a3318b8e2f03b8a6d8ce |
238 | | - # with: |
239 | | - # app-id: ${{ secrets.APIXBOT_APP_ID }} |
240 | | - # private-key: ${{ secrets.APIXBOT_APP_PEM }} |
241 | | - # - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e |
242 | | - # id: pr |
243 | | - # with: |
244 | | - # token: ${{ steps.app-token.outputs.token }} |
245 | | - # title: "${{ env.JIRA_KEY }}: Update Test Snapshots" |
246 | | - # commit-message: "${{ env.JIRA_KEY }}: Update Test Snapshots" |
247 | | - # delete-branch: true |
248 | | - # base: master |
249 | | - # branch: ${{ env.JIRA_KEY }} |
250 | | - # labels: | |
251 | | - # dependencies |
252 | | - # go |
253 | | - # auto_close_jira |
254 | | - # body: | |
255 | | - # ## Proposed changes |
256 | | - # Update Test Snapshots |
257 | | - # _Jira ticket:_ ${{ env.JIRA_KEY }} |
| 192 | + - name: Find JIRA ticket |
| 193 | + id: find |
| 194 | + uses: mongodb/apix-action/find-jira@dd1d8b713effb9ac4972a3318b8e2f03b8a6d8ce |
| 195 | + with: |
| 196 | + token: ${{ secrets.JIRA_API_TOKEN }} |
| 197 | + jql: project = CLOUDP AND status NOT IN (Closed, Resolved) AND summary ~ "Update Test Snapshots" |
| 198 | + - name: Set JIRA ticket (find) |
| 199 | + if: steps.find.outputs.found == 'true' |
| 200 | + run: | |
| 201 | + echo "JIRA_KEY=${{steps.find.outputs.issue-key}}" >> "$GITHUB_ENV" |
| 202 | + - name: Create JIRA ticket |
| 203 | + uses: mongodb/apix-action/create-jira@dd1d8b713effb9ac4972a3318b8e2f03b8a6d8ce |
| 204 | + id: create |
| 205 | + if: steps.find.outputs.found == 'false' |
| 206 | + with: |
| 207 | + token: ${{ secrets.JIRA_API_TOKEN }} |
| 208 | + project-key: CLOUDP |
| 209 | + summary: "[AtlasCLI] Update Test Snapshots" |
| 210 | + issuetype: Story |
| 211 | + description: Update Test Snapshots |
| 212 | + components: AtlasCLI |
| 213 | + assignee: ${{ secrets.ASSIGNEE_JIRA_TICKET }} |
| 214 | + extra-data: | |
| 215 | + { |
| 216 | + "fields": { |
| 217 | + "fixVersions": [ |
| 218 | + { |
| 219 | + "id": "41805" |
| 220 | + } |
| 221 | + ], |
| 222 | + "customfield_12751": [ |
| 223 | + { |
| 224 | + "id": "22223" |
| 225 | + } |
| 226 | + ], |
| 227 | + "customfield_10257": { |
| 228 | + "id": "11861" |
| 229 | + } |
| 230 | + } |
| 231 | + } |
| 232 | + - name: Set JIRA ticket (create) |
| 233 | + if: steps.find.outputs.found == 'false' |
| 234 | + run: | |
| 235 | + echo "JIRA_KEY=${{steps.create.outputs.issue-key}}" >> "$GITHUB_ENV" |
| 236 | + - name: set Apix Bot token |
| 237 | + id: app-token |
| 238 | + uses: mongodb/apix-action/token@dd1d8b713effb9ac4972a3318b8e2f03b8a6d8ce |
| 239 | + with: |
| 240 | + app-id: ${{ secrets.APIXBOT_APP_ID }} |
| 241 | + private-key: ${{ secrets.APIXBOT_APP_PEM }} |
| 242 | + - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e |
| 243 | + id: pr |
| 244 | + with: |
| 245 | + token: ${{ steps.app-token.outputs.token }} |
| 246 | + title: "${{ env.JIRA_KEY }}: Update Test Snapshots" |
| 247 | + commit-message: "${{ env.JIRA_KEY }}: Update Test Snapshots" |
| 248 | + delete-branch: true |
| 249 | + base: master |
| 250 | + branch: ${{ env.JIRA_KEY }} |
| 251 | + labels: | |
| 252 | + dependencies |
| 253 | + go |
| 254 | + auto_close_jira |
| 255 | + body: | |
| 256 | + ## Proposed changes |
| 257 | + Update Test Snapshots |
| 258 | + _Jira ticket:_ ${{ env.JIRA_KEY }} |
258 | 259 |
|
259 | | - # Note: Jira ticket will be closed automatically when this PR is merged. |
260 | | - # - name: Set auto merge |
261 | | - # env: |
262 | | - # GH_TOKEN: ${{ steps.app-token.outputs.token }} |
263 | | - # run: | |
264 | | - # gh pr merge "${{ steps.pr.outputs.pull-request-url }}" --auto --squash |
| 260 | + Note: Jira ticket will be closed automatically when this PR is merged. |
| 261 | + - name: Set auto merge |
| 262 | + env: |
| 263 | + GH_TOKEN: ${{ steps.app-token.outputs.token }} |
| 264 | + run: | |
| 265 | + gh pr merge "${{ steps.pr.outputs.pull-request-url }}" --auto --squash |
0 commit comments