chore: refactor pipelines (#96)
## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Reviewed-on: #96
This commit is contained in:
parent
0b5e15d1c5
commit
2893a11c0a
4 changed files with 74 additions and 65 deletions
10
.github/workflows/clean_up.yaml
vendored
10
.github/workflows/clean_up.yaml
vendored
|
|
@ -38,12 +38,12 @@ jobs:
|
|||
uses: ./.github/actions/notify
|
||||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: CI pipeline started
|
||||
event_title: ${{ github.event.type }}
|
||||
event_author: ${{ github.event.actor.login }}
|
||||
title: CLEAN UP pipeline started
|
||||
event_title: ${{ forgejo.event_name }}
|
||||
event_author: ${{ forgejo.actor }}
|
||||
event_body: "Filter: ${{ inputs.res_prefix }}"
|
||||
event_number: ${{ github.event.id }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ github.run_id }}"
|
||||
event_number: ${{ forgejo.run_number }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}"
|
||||
|
||||
- name: Clean
|
||||
uses: ./.github/actions/clean_up
|
||||
|
|
|
|||
31
.github/workflows/tf-acc-test.yaml
vendored
31
.github/workflows/tf-acc-test.yaml
vendored
|
|
@ -21,6 +21,16 @@ on:
|
|||
type: string
|
||||
default: '90m'
|
||||
required: true
|
||||
test_file:
|
||||
description: "string that determines the test file to run (default all tests)"
|
||||
type: choice
|
||||
options:
|
||||
- tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/wait/postgresflexalpha
|
||||
- tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha
|
||||
- tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/wait/sqlserverflexbeta
|
||||
- tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/sqlserverflexbeta
|
||||
default: ''
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
acc_test:
|
||||
|
|
@ -35,14 +45,15 @@ jobs:
|
|||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: Terraform Acceptance Tests started
|
||||
event_title: ${{ github.event.type }}
|
||||
event_author: ${{ github.event.actor.login }}
|
||||
event_body: 'No event body.'
|
||||
event_number: ${{ github.event.id }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ github.run_id }}"
|
||||
event_title: ${{ github.event_name }}
|
||||
event_author: ${{ github.actor }}
|
||||
event_body: ${{ inputs.test_file }}
|
||||
event_number: ${{ github.run_id }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}"
|
||||
|
||||
- name: Run Test (workflow dispatch)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
id: manual_run
|
||||
uses: ./.github/actions/acc_test
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
|
@ -56,9 +67,11 @@ jobs:
|
|||
tf_acc_kek_service_account: ${{ vars.TF_ACC_KEK_SERVICE_ACCOUNT }}
|
||||
tf_debug: ${{ inputs.enable_debug }}
|
||||
test_timeout_string: ${{ inputs.test_timeout_string }}
|
||||
test_file: ${{ inputs.test_file }}
|
||||
|
||||
- name: Run Test (automatic)
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
id: automatic_run
|
||||
uses: ./.github/actions/acc_test
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
|
@ -76,8 +89,8 @@ jobs:
|
|||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: Terraform Acceptance Tests finished
|
||||
event_title: ${{ github.event.type }}
|
||||
event_author: ${{ github.event.actor.login }}
|
||||
event_body: 'No event body.'
|
||||
event_title: ${{ github.event_name }}
|
||||
event_author: ${{ github.actor }}
|
||||
event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}"
|
||||
event_number: ${{ github.event.id }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ github.run_id }}"
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue