-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* CI * Fix cond * Fix cond * Fix * Fix syntax * Actual * Invert logic to test * Test * Test * Reset test * Test * Fix e2e * Merge changes into existing infra * Add release branch workflow * Fixes from POC * Pass creds * Typo
- Loading branch information
Showing
5 changed files
with
118 additions
and
20 deletions.
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
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
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,41 @@ | ||
name: build-main | ||
|
||
on: | ||
push: | ||
branches: [develop, release-**] | ||
pull_request: | ||
branches: [develop, release-**] | ||
|
||
jobs: | ||
call-build: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
fetch-depth: 0 | ||
|
||
- name: Set POM version for dev branch | ||
if: ${{ github.ref == 'refs/heads/develop' }} | ||
run: echo "pomversion=$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
- name: Set POM version for release branch | ||
if: ${{ startsWith(github.ref, 'refs/heads/release-') }} | ||
run: echo "pomversion=$(date +%Y-%m-%d)-$(git describe --tags)" >> $GITHUB_ENV | ||
|
||
- uses: ./.github/workflows/build | ||
with: | ||
mvn_goal: package | ||
pom_version: ${{ env.pomversion }} | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.PLATFORM_ARTIFACTORY_USER }} | ||
MAVEN_USERPWD: ${{ secrets.PLATFORM_ARTIFACTORY_PWD }} | ||
|
||
call-test: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'pull_request' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/workflows/build | ||
with: | ||
mvn_goal: test |
This file was deleted.
Oops, something went wrong.
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,56 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
|
||
- id: extract_release | ||
run: | | ||
branch_name="${GITHUB_REF#refs/heads/}" | ||
if [[ $branch_name =~ ^release-([0-9]+)$ ]]; then | ||
release_number=${BASH_REMATCH[1]} | ||
echo "release_number=$release_number" >> $GITHUB_ENV | ||
else | ||
echo "Invalid branch name format" | ||
exit 1 | ||
fi | ||
- id: git_config | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
- id: push_prod_tag | ||
run: | | ||
tag_name="${release_number}.1" | ||
git tag -a $tag_name -m stack-${release_number}-prod | ||
git push origin $tag_name | ||
- id: create_new_release_branch | ||
run: | | ||
git checkout develop | ||
next_release_number=$((release_number + 1)) | ||
new_branch="release-${next_release_number}" | ||
git checkout -b $new_branch | ||
new_tag="${next_release_number}.0" | ||
git tag -a $new_tag -m stack-${next_release_number}-staging | ||
git push origin $new_branch | ||
echo "pomversion=$new_tag" >> $GITHUB_ENV | ||
- id: build_new_release_branch | ||
uses: ./.github/workflows/build | ||
with: | ||
mvn_goal: package | ||
pom_version: ${{ env.pomversion }} |