|
16 | 16 | description: "The infrastructure provider to use. Valid options: harvester, gcp"
|
17 | 17 | required: false
|
18 | 18 | default: harvester
|
| 19 | + |
19 | 20 | jobs:
|
20 | 21 | configuration:
|
21 | 22 | name: Configuration
|
@@ -46,29 +47,43 @@ jobs:
|
46 | 47 | echo "skip=${{ github.event.workflow_run.conclusion == 'failure' }}"
|
47 | 48 | } >> $GITHUB_OUTPUT
|
48 | 49 | fi
|
49 |
| - check: |
50 |
| - name: Check for regressions |
51 |
| - needs: [configuration] |
52 |
| - if: ${{ needs.configuration.outputs.skip == 'false' }} |
53 |
| - runs-on: [self-hosted] |
54 |
| - container: |
55 |
| - image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:kylos101-kubecdl-home.1 |
| 50 | +
|
| 51 | + infrastructure: |
| 52 | + name: Create preview environment infrastructure |
| 53 | + needs: [ configuration ] |
| 54 | + runs-on: [ self-hosted ] |
| 55 | + concurrency: |
| 56 | + group: ${{ github.head_ref || github.ref_name }}-infrastructure |
56 | 57 | steps:
|
57 | 58 | - uses: actions/checkout@v3
|
58 | 59 | - name: Create preview environment infrastructure
|
| 60 | + id: create |
59 | 61 | uses: ./.github/actions/preview-create
|
60 | 62 | with:
|
61 | 63 | name: ${{ needs.configuration.outputs.name }}
|
| 64 | + sa_key: ${{ secrets.GCP_CREDENTIALS }} |
62 | 65 | infrastructure_provider: ${{ needs.configuration.outputs.infrastructure_provider }}
|
63 | 66 | large_vm: false
|
64 |
| - sa_key: ${{ secrets.GCP_CREDENTIALS }} |
65 | 67 | - name: Deploy Gitpod to the preview environment
|
66 | 68 | id: deploy-gitpod
|
67 | 69 | uses: ./.github/actions/deploy-gitpod
|
68 | 70 | with:
|
69 | 71 | name: ${{ needs.configuration.outputs.name }}
|
70 | 72 | sa_key: ${{ secrets.GCP_CREDENTIALS }}
|
71 | 73 | version: ${{ needs.configuration.outputs.version}}
|
| 74 | + |
| 75 | + check: |
| 76 | + name: Check for regressions |
| 77 | + needs: [configuration, infrastructure] |
| 78 | + if: ${{ needs.configuration.outputs.skip == 'false' }} |
| 79 | + runs-on: [self-hosted] |
| 80 | + container: |
| 81 | + image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:kylos101-kubecdl-home.1 |
| 82 | + volumes: |
| 83 | + - /var/tmp:/var/tmp |
| 84 | + - /tmp:/tmp |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@v3 |
72 | 87 | - name: Check
|
73 | 88 | shell: bash
|
74 | 89 | env:
|
@@ -142,8 +157,15 @@ jobs:
|
142 | 157 | SLACK_WEBHOOK: '${{ steps.secrets.outputs.devx-slack-webhook }}'
|
143 | 158 | SLACK_COLOR: ${{ job.status }}
|
144 | 159 | SLACK_MESSAGE: "`${{ needs.configuration.outputs.version}}` smoke test failed"
|
| 160 | + |
| 161 | + delete: |
| 162 | + name: Delete preview environment |
| 163 | + needs: [ configuration, infrastructure, check ] |
| 164 | + if: always() |
| 165 | + runs-on: [ self-hosted ] |
| 166 | + steps: |
| 167 | + - uses: actions/checkout@v3 |
145 | 168 | - name: Delete preview environment
|
146 |
| - if: always() |
147 | 169 | uses: ./.github/actions/delete-preview
|
148 | 170 | with:
|
149 | 171 | name: ${{ needs.configuration.outputs.name }}
|
|
0 commit comments