-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[draft] ci: check releases #2170
Draft
fpaul-1A
wants to merge
1
commit into
main
Choose a base branch
from
ci/check-releases
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,5 @@ | ||
--- | ||
title: Some releases are failing the tests | ||
labels: bug | ||
--- | ||
On {{ date | date('D MMM YYYY') }} some releases failed the automated tests. Check the [action result]({{ env.RUN_URL }}). |
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,67 @@ | ||
name: Check all releases (latest patch of each minor version for the last 3 majors) | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * 6" | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
|
||
jobs: | ||
findTags: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tags: ${{ steps.getTags.outputs.TAGS }} | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: Get the latest patch of each minor version for the last 3 majors | ||
run: | | ||
# Extract all releases | ||
RELEASE_TAG_PATTERN="^v[0-9]+\.[0-9]+\.[0-9]+$" | ||
ALL_RELEASES=$(git tag -l | sort -V | grep -E $RELEASE_TAG_PATTERN) | ||
SUPPORTED_MAJORS=$(echo $ALL_RELEASES | tr ' ' '\n' | awk -F. '{print $1}' | uniq | tail -n 3) | ||
ALL_SUPPORTED_RELEASES=$(echo $ALL_RELEASES | tr ' ' '\n' | grep -E "^($(echo $SUPPORTED_MAJORS | tr ' ' '|'))\.") | ||
echo "Supported releases: $ALL_SUPPORTED_RELEASES" | ||
|
||
# Filter per major | ||
LATEST_MINOR_OF_EACH_MAJOR=$(echo $ALL_SUPPORTED_RELEASES | tr ' ' '\n' | awk -F. '{print $1}' | uniq | xargs -I {} sh -c "echo '$ALL_SUPPORTED_RELEASES' | grep -E '^{}.*' | tail -n 1") | ||
echo "Found latest minor of each major versions: $LATEST_MINOR_OF_EACH_MAJOR" | ||
|
||
# Filter per minor | ||
LATEST_PATCH_OF_EACH_MINOR=$(echo $ALL_SUPPORTED_RELEASES | tr ' ' '\n' | awk -F. '{print $1 "." $2}' | uniq | xargs -I {} sh -c "echo '$ALL_SUPPORTED_RELEASES' | grep -E '^{}.*' | tail -n 1") | ||
echo "Found latest patch of each minor versions: $LATEST_PATCH_OF_EACH_MINOR" | ||
|
||
# Export output in JSON format | ||
TAGS=$(echo $LATEST_MINOR_OF_EACH_MAJOR | tr ' ' '\n' | awk '{print "\"" $0 "\""}' | tr '\n' ',') | ||
echo "TAGS=[$TAGS]" >> "$GITHUB_OUTPUT" | ||
id: getTags | ||
|
||
checkRelease: | ||
needs: findTags | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tag: ${{ fromJSON(needs.findTags.outputs.tags) }} | ||
uses: ./.github/workflows/check-release.yml | ||
with: | ||
ref: ${{ matrix.tag }} | ||
|
||
report: | ||
runs-on: ubuntu-latest | ||
needs: checkRelease | ||
if: failure() | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Create an issue | ||
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUN_URL: ${{ format('https://github.com/{0}/actions/runs/{1}/attempts/{2}', github.repository, github.run_id, github.run_attempt || 1) }} | ||
with: | ||
filename: .github/check-release-issue-template.md | ||
update_existing: true |
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,43 @@ | ||
name: Check release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
type: string | ||
required: true | ||
description: The branch, tag or SHA to checkout. | ||
workflow_call: | ||
inputs: | ||
ref: | ||
type: string | ||
default: '' | ||
description: The branch, tag or SHA to checkout. | ||
secrets: | ||
NX_CLOUD_ACCESS_TOKEN: | ||
required: false | ||
description: Token to use Nx Cloud token | ||
|
||
jobs: | ||
buildRelease: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- uses: ./tools/github-actions/setup | ||
- uses: ./.github/actions/setup-java | ||
with: | ||
install-jdk: 'true' | ||
- run: yarn build:swagger-gen | ||
- run: yarn build | ||
- uses: ./tools/github-actions/upload-build-output | ||
with: | ||
artifactName: 'dist-${{ inputs.ref }}' | ||
|
||
testRelease: | ||
needs: [buildRelease] | ||
uses: ./.github/workflows/it-tests.yml | ||
with: | ||
ref: ${{ inputs.ref }} | ||
skipNxCache: true |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we have some instability on it-tests
should we add 1 or 2
retry
on this step before it opens an issue ?