|
28 | 28 | renku-ui: ${{ steps.deploy-comment.outputs.renku-ui}} |
29 | 29 | test-enabled: ${{ steps.deploy-comment.outputs.test-enabled}} |
30 | 30 | extra-values: ${{ steps.deploy-comment.outputs.extra-values}} |
| 31 | + persist: ${{ steps.deploy-comment.outputs.persist}} |
31 | 32 | steps: |
32 | 33 | - id: deploy-comment |
33 | | - uses: SwissDataScienceCenter/renku-actions/check-pr-description@v0.3.2 |
| 34 | + uses: SwissDataScienceCenter/renku-actions/check-pr-description@v0.5.0 |
34 | 35 | with: |
35 | 36 | string: /deploy |
36 | 37 | pr_ref: ${{ github.event.number }} |
|
42 | 43 | name: renku-ci-rp-${{ github.event.number }} |
43 | 44 | steps: |
44 | 45 | - name: deploy-pr |
45 | | - uses: SwissDataScienceCenter/renku-actions/deploy-renku@v0.3.2 |
| 46 | + uses: SwissDataScienceCenter/renku-actions/deploy-renku@v0.5.0 |
46 | 47 | env: |
47 | 48 | DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }} |
48 | 49 | DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }} |
@@ -84,43 +85,27 @@ jobs: |
84 | 85 |
|
85 | 86 | test-pr: |
86 | 87 | runs-on: ubuntu-20.04 |
87 | | - if: github.event.action != 'closed' |
| 88 | + if: ${{ github.event.action != 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true' && needs.check-deploy.outputs.test-enabled == 'true' }} |
88 | 89 | needs: [check-deploy, deploy-pr] |
89 | 90 | steps: |
90 | | - - uses: actions/checkout@v2 |
91 | | - - uses: actions/setup-python@v1 |
92 | | - with: |
93 | | - python-version: 3.8 |
94 | | - - name: Test the PR |
95 | | - if: "needs.check-deploy.outputs.pr-contains-string == 'true' && needs.check-deploy.outputs.test-enabled == 'true'" |
96 | | - env: |
97 | | - KUBECONFIG: ${{ github.workspace }}/renkubot-kube.config |
98 | | - RENKUBOT_KUBECONFIG: ${{ secrets.RENKUBOT_DEV_KUBECONFIG }} |
99 | | - RENKU_RELEASE: renku-ci-rp-${{ github.event.number }} |
100 | | - run: | |
101 | | - echo "$RENKUBOT_KUBECONFIG" > ${{ github.workspace }}/renkubot-kube.config |
102 | | - helm test ${RENKU_RELEASE} --namespace ${RENKU_RELEASE} --timeout 80m --logs |
103 | | - - name: Download artifact for packaging on failure |
104 | | - if: failure() |
105 | | - uses: SwissDataScienceCenter/renku-actions/[email protected] |
106 | | - env: |
107 | | - RENKU_VALUES: ${{ secrets.CI_RENKU_VALUES }} |
108 | | - TEST_ARTIFACTS_PATH: "tests-artifacts-${{ github.sha }}" |
109 | | - - name: Upload screenshots on failure |
110 | | - if: failure() |
111 | | - uses: actions/upload-artifact@v1 |
| 91 | + - uses: SwissDataScienceCenter/renku-actions/[email protected] |
112 | 92 | with: |
113 | | - name: acceptance-test-artifacts |
114 | | - path: ${{ github.workspace }}/test-artifacts/ |
| 93 | + renkubot-kubeconfig: ${{ secrets.RENKUBOT_DEV_KUBECONFIG }} |
| 94 | + renku-release: renku-ci-rp-${{ github.event.number }} |
| 95 | + gitlab-token: ${{ secrets.DEV_GITLAB_TOKEN }} |
| 96 | + persist: "${{ needs.check-deploy.outputs.persist }}" |
| 97 | + ci-renku-values: ${{ secrets.CI_RENKU_VALUES }} |
| 98 | + |
115 | 99 | cleanup: |
116 | | - if: github.event.action == 'closed' |
| 100 | + needs: check-deploy |
| 101 | + if: github.event.action == 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true' |
117 | 102 | runs-on: ubuntu-20.04 |
118 | 103 | steps: |
119 | | - - uses: actions/checkout@v2 |
120 | 104 | - name: renku teardown |
121 | | - uses: SwissDataScienceCenter/renku-actions/teardown-renku@v0.3.2 |
| 105 | + uses: SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@v0.5.0 |
122 | 106 | env: |
| 107 | + HELM_RELEASE_REGEX: "^renku-ci-rp-${{ github.event.number }}$" |
123 | 108 | GITLAB_TOKEN: ${{ secrets.DEV_GITLAB_TOKEN }} |
124 | | - KUBECONFIG: "${{ github.workspace }}/renkubot-kube.config" |
125 | | - RENKU_RELEASE: renku-ci-rp-${{ github.event.number }} |
126 | 109 | RENKUBOT_KUBECONFIG: ${{ secrets.RENKUBOT_DEV_KUBECONFIG }} |
| 110 | + MAX_AGE_SECONDS: 0 |
| 111 | + DELETE_NAMESPACE: "true" |
0 commit comments