generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
118 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Periodic Github Checks' | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs daily at midnight | ||
workflow_dispatch: # Allows manual triggering of the workflow | ||
|
||
jobs: | ||
stale-issues: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
days-before-stale: 60 | ||
days-before-close: 7 | ||
stale-issue-label: 'lifecycle/stale' | ||
stale-pr-label: 'lifecycle/stale' | ||
exempt-issue-labels: 'lifecycle/frozen' | ||
exempt-pr-labels: 'lifecycle/frozen' | ||
stale-issue-message: | | ||
This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. | ||
Thank you for your contributions. | ||
stale-pr-message: | | ||
This pull request has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. | ||
Thank you for your contributions. | ||
close-issue-message: | | ||
This issue has been automatically closed due to the lack of recent activity. | ||
/lifecycle rotten | ||
close-pr-message: | | ||
This pull request has been automatically closed due to the lack of recent activity. | ||
/lifecycle rotten |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: PR Lifecycle | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "release-*" | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
manager-upgrade: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Golang | ||
uses: "./.github/template/setup-golang" | ||
|
||
- name: Provision K3D | ||
shell: bash | ||
run: make provision-k3d | ||
|
||
- name: Deploy with latest tag | ||
shell: bash | ||
run: | | ||
git fetch --tags | ||
LATEST_TAG=$(git tag --sort=-creatordate | sed -n 1p) | ||
echo "Using tag ${LATEST_TAG}" | ||
git checkout ${LATEST_TAG} | ||
GIT_COMMIT_SHA=$(git rev-parse --short=8 HEAD) | ||
GIT_COMMIT_DATE=$(git show -s --format=%cd --date=format:'v%Y%m%d' ${GIT_COMMIT_SHA}) | ||
echo "Deploying Manager using image europe-docker.pkg.dev/kyma-project/prod/telemetry-manager:${GIT_COMMIT_DATE}-${GIT_COMMIT_SHA}" | ||
IMG=europe-docker.pkg.dev/kyma-project/prod/telemetry-manager:${GIT_COMMIT_DATE}-${GIT_COMMIT_SHA} make deploy-dev | ||
- name: Switch back to current revision | ||
uses: actions/checkout@v4 | ||
|
||
- name: Wait for operator readiness | ||
shell: bash | ||
run: kubectl -n kyma-system rollout status deployment telemetry-operator --timeout=90s | ||
|
||
- name: Run test on latest tag | ||
shell: bash | ||
run: make run-upgrade-test | ||
|
||
- name: Wait for cleanup of test run | ||
shell: bash | ||
run: hack/wait-for-namespaces.sh | ||
|
||
# wait for the build to succeed so that the manager image is available | ||
- name: Wait for the 'pull-telemetry-manager-build' job to succeed | ||
uses: kyma-project/wait-for-commit-status-action@2b3ffe09af8b6f40e1213d5fb7f91a7bd41ffb20 | ||
with: | ||
context: "pull-telemetry-manager-build" | ||
commit_ref: "${{ github.event.pull_request.head.sha }}" # Note: 'github.event.pull_request.head.sha' is not same as 'github.sha' on pull requests. | ||
timeout: 600000 # 10 minutes in milliseconds | ||
# The check interval is kept long otherwise it will exhaust the GitHub rate limit (More info: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting) | ||
check_interval: 60000 # 1 minute in milliseconds | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
GITHUB_OWNER: "${{ github.repository_owner }}" | ||
GITHUB_REPO: "telemetry-manager" | ||
|
||
- name: Deploy with current version | ||
shell: bash | ||
run: | | ||
IMG=europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:PR-${{ github.event.number }} make deploy-dev | ||
- name: Wait for operator readiness | ||
shell: bash | ||
run: kubectl -n kyma-system rollout status deployment telemetry-operator --timeout=90s | ||
|
||
- name: Run test on current version | ||
shell: bash | ||
run: make run-upgrade-test | ||
|
||
- name: Finalize test | ||
uses: "./.github/template/finalize-test" | ||
if: success() || failure() | ||
with: | ||
failure: failure() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"text": "'${{ github.workflow }}' workflow failed on '${{ env.DEFAULT_BRANCH }}' branch in the '${{ github.event.repository.name }}' repository!" | ||
"text": "'${{ github.workflow }}' workflow failed, see https://github.com/kyma-project/telemetry-manager/actions" | ||
} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/post-release.yml → .github/workflows/tag-release.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: GitHub Release | ||
name: Tag Release | ||
|
||
on: | ||
push: | ||
|