fix: pipeline_fix (#99)
## 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: #99
This commit is contained in:
parent
d16b97a8e9
commit
aac1a2ba17
6 changed files with 86 additions and 34 deletions
14
.github/workflows/ci_new.yaml
vendored
14
.github/workflows/ci_new.yaml
vendored
|
|
@ -34,15 +34,17 @@ jobs:
|
|||
uses: actions/checkout@v6
|
||||
|
||||
- name: Notify
|
||||
if: always()
|
||||
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 }}
|
||||
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 }}"
|
||||
title: "[START] CI pipeline (#${{ forgejo.run_number }})"
|
||||
subtitle: "${{ forgejo.event_name }} on ${{ forgejo.ref_name }}"
|
||||
event_title: "${{ forgejo.event_name }} for ${{ forgejo.repository }}"
|
||||
event_author: ${{ forgejo.actor }}
|
||||
event_body: "${{ forgejo.event_name }} on ${{ forgejo.ref }} for ${{ forgejo.repository }}"
|
||||
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: Check GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v7
|
||||
|
|
|
|||
4
.github/workflows/clean_up.yaml
vendored
4
.github/workflows/clean_up.yaml
vendored
|
|
@ -38,7 +38,7 @@ jobs:
|
|||
uses: ./.github/actions/notify
|
||||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: "[START] CLEAN UP pipeline"
|
||||
title: "[START] CLEAN UP pipeline (#${{ forgejo.run_number }})"
|
||||
subtitle: "${{ forgejo.repository }}"
|
||||
event_title: ${{ forgejo.event_name }}
|
||||
event_author: ${{ forgejo.actor }}
|
||||
|
|
@ -62,7 +62,7 @@ jobs:
|
|||
uses: ./.github/actions/notify
|
||||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: "[END] CLEAN UP pipeline"
|
||||
title: "[END] CLEAN UP pipeline (#${{ forgejo.run_number }})"
|
||||
subtitle: "${{ forgejo.repository }}"
|
||||
event_title: ${{ forgejo.event_name }}
|
||||
event_author: ${{ forgejo.actor }}
|
||||
|
|
|
|||
28
.github/workflows/publish.yaml
vendored
28
.github/workflows/publish.yaml
vendored
|
|
@ -51,12 +51,13 @@ jobs:
|
|||
uses: ./.github/actions/notify
|
||||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: Publish started
|
||||
event_title: ${{ github.event.type }}
|
||||
event_author: ${{ github.event.actor.login }}
|
||||
event_body: "Trigger: ${{ github.event_name }}"
|
||||
event_number: ${{ github.event.id }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ github.run_id }}"
|
||||
title: "[START] Publish (#${{ forgejo.run_number }})"
|
||||
subtitle: "${{ forgejo.event_name }} on branch ${{ forgejo.ref }}"
|
||||
event_title: "run started"
|
||||
event_author: ${{ forgejo.actor }}
|
||||
event_body: ""
|
||||
event_number: ${{ forgejo.event.id }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}"
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v6
|
||||
|
|
@ -145,6 +146,7 @@ jobs:
|
|||
--outFile nav.md
|
||||
|
||||
- name: Publish provider to S3
|
||||
id: publish_to_s3
|
||||
run: |
|
||||
set -e
|
||||
cd release/
|
||||
|
|
@ -165,3 +167,17 @@ jobs:
|
|||
# echo "${{ github.ref_name }}" >docs/_version.txt
|
||||
scp -o StrictHostKeyChecking=no -r docs ubuntu@${{ vars.DOCS_SERVER_IP }}:/srv/www/
|
||||
scp -o StrictHostKeyChecking=no nav.md ubuntu@${{ vars.DOCS_SERVER_IP }}:/srv/www/
|
||||
|
||||
- name: Notify
|
||||
if: always()
|
||||
uses: ./.github/actions/notify
|
||||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: "[END] Publish (#${{ forgejo.run_number }})"
|
||||
subtitle: "${{ forgejo.event_name }} on branch ${{ forgejo.ref }}"
|
||||
event_title: "released: ${{ steps.get_version.outputs.version }}"
|
||||
event_author: ${{ forgejo.actor }}
|
||||
event_body: ""
|
||||
event_number: ${{ forgejo.event.id }}
|
||||
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}"
|
||||
status: "${{ steps.publish_to_s3.outcome == 'success' && 'SUCCESS' || 'FAILURE' }}"
|
||||
|
|
|
|||
28
.github/workflows/tf-acc-test.yaml
vendored
28
.github/workflows/tf-acc-test.yaml
vendored
|
|
@ -41,17 +41,20 @@ jobs:
|
|||
|
||||
- name: set start time
|
||||
id: start_time
|
||||
continue-on-error: true
|
||||
run: |
|
||||
echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV}
|
||||
echo "start=$(date +%s%N)" >> ${GITHUB_ENV}
|
||||
time=$(date --rfc-3339=ns)
|
||||
echo "start_time=$time" >> ${GITHUB_OUTPUT}
|
||||
start=$(date +%s%N)
|
||||
echo "start=$start" >> ${GITHUB_OUTPUT}
|
||||
|
||||
- name: Notify
|
||||
uses: ./.github/actions/notify
|
||||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: "[START] Terraform Acceptance Tests"
|
||||
title: "[START] Terraform Acceptance Tests (#${{ forgejo.run_number }})"
|
||||
subtitle: "${{ forgejo.event_name }} on branch ${{ forgejo.ref }}"
|
||||
event_title: "started: ${{ steps.start_time.outputs.time }}"
|
||||
event_title: "started: ${{ steps.start_time.outputs.start_time }}"
|
||||
event_author: ${{ forgejo.actor }}
|
||||
event_body: ${{ inputs.test_file }}
|
||||
event_number: ${{ forgejo.run_number }}
|
||||
|
|
@ -60,6 +63,7 @@ jobs:
|
|||
- name: Run Test (workflow dispatch)
|
||||
if: ${{ forgejo.event_name == 'workflow_dispatch' }}
|
||||
id: manual_run
|
||||
continue-on-error: true
|
||||
uses: ./.github/actions/acc_test
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
|
@ -78,6 +82,7 @@ jobs:
|
|||
- name: Run Test (automatic)
|
||||
if: ${{ forgejo.event_name != 'workflow_dispatch' }}
|
||||
id: automatic_run
|
||||
continue-on-error: true
|
||||
uses: ./.github/actions/acc_test
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
|
@ -92,22 +97,27 @@ jobs:
|
|||
|
||||
- name: set end time
|
||||
id: end_time
|
||||
continue-on-error: true
|
||||
run: |
|
||||
echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV}
|
||||
set -e
|
||||
echo "auto status: ${{ steps.automatic_run.outputs.status }}"
|
||||
echo "manual status: ${{ steps.manual_run.outputs.status }}"
|
||||
echo "status: ${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}"
|
||||
echo "end_time=$(date --rfc-3339=ns)" >> ${GITHUB_OUTPUT}
|
||||
end=$(date +%s%N)
|
||||
echo "end=${end}" >> ${GITHUB_ENV}
|
||||
echo "end=${end}" >> ${GITHUB_OUTPUT}
|
||||
start=${{ steps.start_time.outputs.start }}
|
||||
diff=$((end-start))
|
||||
duration=$(printf "%s.%s" "${diff:0: -9}" "${diff: -9:3}")
|
||||
echo "duration=${duration}" >> ${GITHUB_ENV}
|
||||
echo "duration=${duration}" >> ${GITHUB_OUTPUT}
|
||||
|
||||
- name: Notify
|
||||
uses: ./.github/actions/notify
|
||||
with:
|
||||
webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }}
|
||||
title: "[END] Terraform Acceptance Tests"
|
||||
title: "[END] Terraform Acceptance Tests (#${{ forgejo.run_number }})"
|
||||
subtitle: "${{ forgejo.event_name }} on branch ${{ forgejo.ref }} with status: ${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}"
|
||||
event_title: "run ended: ${{ steps.end_time.outputs.time }}, duration: ${{ steps.end_time.outputs.duration }} seconds"
|
||||
event_title: "run ended: ${{ steps.end_time.outputs.end_time }}, duration: ${{ steps.end_time.outputs.duration }} seconds"
|
||||
event_author: ${{ forgejo.actor }}
|
||||
event_body: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.result || steps.automatic_run.outputs.result }}"
|
||||
event_number: ${{ forgejo.event.id }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue