Skip to content
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

Move snapshot steps to be with release steps in complete workflow #984

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 76 additions & 78 deletions .github/workflows/pass-complete-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,35 @@ jobs:
docker push ghcr.io/eclipse-pass/pass-journal-loader:$RELEASE
docker push ghcr.io/eclipse-pass/pass-nihms-loader:$RELEASE

- name: Push the Release commits and tags ~ Java Repositories
- name: Set Snapshot/commit ~ Java Repositories
if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }}
run: |
(cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit --allow-empty -am "Update version to $NEXT")
(cd combined && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT)
(cd combined/pass-core && git commit --allow-empty -am "Update version to $NEXT")
(cd combined/pass-support && git commit --allow-empty -am "Update version to $NEXT")

- name: Release Snapshot Java modules
if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }}
working-directory: combined
run: |
mvn -B -V -ntp -P release clean deploy -DskipTests -DskipITs
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Push Snapshot Docker images to GHCR ~ Java Repositories
if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }}
run: |
docker push ghcr.io/eclipse-pass/pass-core-main:$NEXT
docker push ghcr.io/eclipse-pass/deposit-services-core:$NEXT
docker push ghcr.io/eclipse-pass/pass-notification-service:$NEXT
docker push ghcr.io/eclipse-pass/jhu-grant-loader:$NEXT
docker push ghcr.io/eclipse-pass/pass-journal-loader:$NEXT
docker push ghcr.io/eclipse-pass/pass-nihms-loader:$NEXT

- name: Push the commits and tags ~ Java Repositories
if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }}
run: |
(cd main && git push --atomic origin main --force $RELEASE)
Expand All @@ -135,6 +163,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.JAVA_RELEASE_PAT }}


- name: Set Release/commit/tag ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
Expand All @@ -154,7 +183,28 @@ jobs:
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
run: docker push ghcr.io/eclipse-pass/pass-ui:$RELEASE

- name: Push the Release commits and tags ~ pass-ui
- name: Set Snapshot/commit ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
with:
repository_dir: combined/pass-ui
skip_tag: "true"
env:
RELEASE: ${{ env.NEXT }}

- name: Build Snapshot pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-build
with:
repository_dir: combined/pass-ui
env_path: ../pass-docker/.env
is_dev: "true"

- name: Push Snapshot Docker images to GHCR ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
run: docker push ghcr.io/eclipse-pass/pass-ui:$NEXT

- name: Push the commits and tags ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
run: cd combined/pass-ui && git push --atomic origin main --force $RELEASE

Expand All @@ -164,6 +214,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.JAVA_RELEASE_PAT }}


- name: Set Release/commit/tag ~ pass-acceptance-testing
if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
Expand All @@ -172,7 +223,16 @@ jobs:
env:
RELEASE: ${{ env.RELEASE }}

- name: Push the Release commits and tags ~ pass-acceptance-testing
- name: Set Snapshot/commit ~ pass-acceptance-testing
if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
with:
repository_dir: combined/pass-acceptance-testing
skip_tag: "true"
env:
RELEASE: ${{ env.NEXT }}

- name: Push the commits and tags ~ pass-acceptance-testing
if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }}
run: cd combined/pass-acceptance-testing && git push --atomic origin main --force $RELEASE

Expand All @@ -182,6 +242,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.JAVA_RELEASE_PAT }}


- name: Set Release/commit/tag ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: |
Expand All @@ -201,93 +262,30 @@ jobs:
docker push ghcr.io/eclipse-pass/demo-ldap:$RELEASE
docker push ghcr.io/eclipse-pass/idp:$RELEASE

- name: Push the Release commits and tags ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: cd combined/pass-docker && git push --atomic origin main --force $RELEASE

- name: Create GitHub main release ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: gh release create "$RELEASE" --repo=eclipse-pass/pass-docker --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.JAVA_RELEASE_PAT }}

- name: Set Snapshot/commit ~ Java Repositories
run: |
(cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit --allow-empty -am "Update version to $NEXT")
(cd combined && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT)
(cd combined/pass-core && git commit --allow-empty -am "Update version to $NEXT")
(cd combined/pass-support && git commit --allow-empty -am "Update version to $NEXT")

- name: Release Snapshot Java modules
working-directory: combined
run: |
mvn -B -V -ntp -P release clean deploy -DskipTests -DskipITs
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Push Snapshot Docker images to GHCR ~ Java Repositories
run: |
docker push ghcr.io/eclipse-pass/pass-core-main:$NEXT
docker push ghcr.io/eclipse-pass/deposit-services-core:$NEXT
docker push ghcr.io/eclipse-pass/pass-notification-service:$NEXT
docker push ghcr.io/eclipse-pass/jhu-grant-loader:$NEXT
docker push ghcr.io/eclipse-pass/pass-journal-loader:$NEXT
docker push ghcr.io/eclipse-pass/pass-nihms-loader:$NEXT

- name: Push the Snapshot commits ~ Java Repositories
run: |
(cd main && git push origin main)
(cd combined/pass-core && git push origin main)
(cd combined/pass-support && git push origin main)

- name: Set Snapshot/commit ~ pass-ui
uses: ./main/.github/actions/yarn-version
with:
repository_dir: combined/pass-ui
skip_tag: "true"
env:
RELEASE: ${{ env.NEXT }}

- name: Build Snapshot pass-ui
uses: ./main/.github/actions/yarn-build
with:
repository_dir: combined/pass-ui
env_path: ../pass-docker/.env
is_dev: "true"

- name: Push Snapshot Docker images to GHCR ~ pass-ui
run: docker push ghcr.io/eclipse-pass/pass-ui:$NEXT

- name: Push the Snapshot commits ~ pass-ui
run: cd combined/pass-ui && git push origin main

- name: Set Snapshot/commit ~ pass-acceptance-testing
uses: ./main/.github/actions/yarn-version
with:
repository_dir: combined/pass-acceptance-testing
skip_tag: "true"
env:
RELEASE: ${{ env.NEXT }}

- name: Push the Snapshot commits ~ pass-acceptance-testing
run: cd combined/pass-acceptance-testing && git push origin main

- name: Set Snapshot/commit ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: |
cd combined/pass-docker
sed -i "/^PASS_VERSION/s/.*/PASS_VERSION=$NEXT/" .env
git commit --allow-empty -am "Update version to $NEXT"

- name: Build Snapshot pass-docker images
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
working-directory: combined/pass-docker
run: docker compose -f docker-compose.yml -f eclipse-pass.local.yml build idp ldap

- name: Push Snapshot Docker images to GHCR ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: |
docker push ghcr.io/eclipse-pass/demo-ldap:$NEXT
docker push ghcr.io/eclipse-pass/idp:$NEXT

- name: Push the Snapshot commits ~ pass-docker
run: cd combined/pass-docker && git push origin main
- name: Push the commits and tags ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: cd combined/pass-docker && git push --atomic origin main --force $RELEASE

- name: Create GitHub main release ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: gh release create "$RELEASE" --repo=eclipse-pass/pass-docker --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.JAVA_RELEASE_PAT }}
Loading