diff --git a/.github/workflows/bld_all.yml b/.github/workflows/bld_all.yml
deleted file mode 100644
index ab01a41f63a..00000000000
--- a/.github/workflows/bld_all.yml
+++ /dev/null
@@ -1,185 +0,0 @@
-name: bld_all
-
-permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
-
-on:
- workflow_call:
- inputs:
- version_tag:
- description: 'Version tag to use: (bump must also be set to none to keep a specific version'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'Version tag to use: (bump must also be set to none to keep a specific version'
- required: false
- default: 'latest'
- type: string
- bump:
- description: |
- How to optionally bump the semver version ( Major.Minor.Patch ) : git log will be searched for
- '#major #minor #patch' or feat/ or fix/ branch names to optionally override the bump. Set to none to keep a specific version
- required: false
- options:
- - patch
- - minor
- - major
- - none
- type: choice
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
-jobs:
-
- bld_ml:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- project: orcid-message-listener
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- bld_amq:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- project: orcid-activemq
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- bld_api:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- project: orcid-api-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- bld_iapi:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- project: orcid-internal-api
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- bld_pubweb:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- project: orcid-pub-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- bld_sched:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- project: orcid-scheduler-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- bld_web:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- project: orcid-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
diff --git a/.github/workflows/bld_all_matrix.yml b/.github/workflows/bld_all_matrix.yml
deleted file mode 100644
index f4f09df4882..00000000000
--- a/.github/workflows/bld_all_matrix.yml
+++ /dev/null
@@ -1,293 +0,0 @@
-name: bld_all_matrix
-
-permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
-
-on:
- workflow_call:
- inputs:
- version_tag:
- description: 'Version tag to use: (bump must also be set to none to keep a specific version'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'Version tag to use: (bump must also be set to none to keep a specific version'
- required: false
- default: 'latest'
- type: string
- bump:
- description: |
- How to optionally bump the semver version ( Major.Minor.Patch ) : git log will be searched for
- '#major #minor #patch' or feat/ or fix/ branch names to optionally override the bump. Set to none to keep a specific version
- required: false
- options:
- - patch
- - minor
- - major
- - none
- type: choice
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
-
-jobs:
-
- bld:
- strategy:
- matrix:
- # The include keyword that adds a new variable
- include:
- - artifact_name: orcid-message-listener
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- - artifact_name: orcid-activemq
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- - artifact_name: orcid-api-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- - artifact_name: orcid-internal-api
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- - artifact_name: orcid-pub-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- - artifact_name: orcid-scheduler-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- - artifact_name: orcid-web
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
-
- runs-on: ubuntu-latest
- steps:
-
- - name: git-checkout-ref-action
- id: ref
- uses: ORCID/git-checkout-ref-action@main
- with:
- default_branch: ${{ github.event.repository.default_branch }}
- ref: ${{ inputs.ref }}
-
- - uses: actions/checkout@v3
- with:
- ref: ${{ steps.ref.outputs.ref }}
- # checkout some history so we can scan commits for bump messages
- # NOTE: history does not include tags!
- fetch-depth: 100
-
- - name: find next version
- id: version
- uses: ORCID/version-bump-action@main
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
-
- - name: Set up Open JDK 11
- uses: actions/setup-java@v3
- with:
- distribution: 'temurin'
- java-version: '11'
- cache: 'maven'
-
- - name: show path
- run: |
- echo "$PATH"
- which java
- echo "$JAVA_HOME"
- echo "$tag_numeric"
- echo "$project"
- shell: bash
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
- project: "${{ matrix.artifact_name }}"
-
- - name: populate orcid-persistence/src/main/resources/release_name.txt with numeric tag
- run: |
- echo "$version_tag_numeric" > orcid-persistence/src/main/resources/release_name.txt
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: bump version of the parent pom and connected projects
- run: |
- mvn -T 1C --batch-mode versions:set \
- -DnewVersion="$version_tag_numeric" -DgenerateBackupPoms=false -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: bump the tagged version in the poms of projects not tied to the parent pom (orcid-test)
- run: |
- mvn -T 1C --batch-mode versions:set \
- -DnewVersion="$version_tag_numeric" -DgenerateBackupPoms=false -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects orcid-test
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: install orcid-parent into our local maven repo because the builds depend a version release
- run: |
- mvn -T 1C --batch-mode --non-recursive clean install -DskipTests \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: install orcid-test into our local maven repo because the builds depend a version release
- run: |
- mvn -T 1C --batch-mode clean install -DskipTests\
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects orcid-test
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: install orcid-utils into our local maven repo because the builds depend a version release
- run: |
- mvn -T 1C --batch-mode clean install -DskipTests \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects orcid-utils
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: install orcid-persistence into our local maven repo because orcid-core depends on it
- run: |
- mvn -T 1C --batch-mode clean install -DskipTests \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects orcid-persistence
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: install orcid-core into our local maven repo because the builds depend a version release
- run: |
- mvn -T 1C --batch-mode clean install -DskipTests \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects orcid-core
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
- - name: check some build related things
- run: |
- git --version
- git config user.name "GitHub Actions Bot"
- git config user.email "<>"
- git status
- git diff
-
- - name: build our project
- run: |
- mvn -T 1C --batch-mode -am package -DskipTests \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects "$project"
- echo "------------------------------------------------------"
-
- find . -name '*.war'
- find . -name '*.jar'
- env:
- project: "${{ matrix.artifact_name }}"
-
-#
-# orcid-web customization
-#
-
- - name: setup node for angular static file
- if: ${{ matrix.artifact_name == 'orcid-web' }}
- uses: actions/setup-node@v3
- with:
- node-version: 18.7.0
-
- - name: build angular parts if we are building orcid-web
- if: ${{ matrix.artifact_name == 'orcid-web' }}
- run: |
- echo "Build angular_orcid_generated.js"
- cd orcid-nodejs
- mvn -T 1C --batch-mode -P ci clean compile \
- -Dnodejs.workingDirectory="${{ github.workspace }}/orcid-web/src/main/webapp/static/javascript/ng1Orcid" \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
-
- echo "Copying angular_orcid_generated to its final destination"
- cp ${{ github.workspace }}/orcid-web/src/main/webapp/static/javascript/ng1Orcid/angular_orcid_generated.js ${{ github.workspace }}/orcid-web/target/orcid-web/static/javascript/ng1Orcid/
-
- echo "Packaging orcid-web"
- rm -f ${{ github.workspace }}/orcid-web/target/orcid-web.war
- cd ${{ github.workspace }}/orcid-web/target/orcid-web
-
- # have a file on the webserver we can hit
- echo "$version_tag_numeric" > ${{ github.workspace }}/orcid-web/target/orcid-web/static/version
-
- echo "Creating the war file"
- jar -cf orcid-web.war .
-
- # check_error "Creating the orcid-web.war file"
- echo "Moving war file to the target folder"
- cp orcid-web.war ${{ github.workspace }}/orcid-web/target/
- echo "orcid-web.war is ready"
-
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
- project: "${{ matrix.artifact_name }}"
-
-##################################################################################################################
-
-
- - name: install orcid-api-common into our local maven repo because the deploy depends on this orcid-web orcid-iapi orcid-api
- if: ${{ matrix.artifact_name == 'orcid-web' }} || ${{ matrix.artifact_name == 'orcid-internal-api' }} || ${{ matrix.artifact_name == 'orcid-api-web' }} || ${{ matrix.artifact_name == 'orcid-pub-web' }}
- run: |
- mvn -T 1C --batch-mode clean install -DskipTests \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects orcid-api-common
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
-
- - name: deploy war file
- run: |
- mvn --batch-mode \
- --settings settings-deploy.xml \
- --file "${project}/pom.xml" \
- -Dmaven.test.skip \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- -DaltReleaseDeploymentRepository="github::${ARTIFACT_URL}${ARTIFACT_REPO_PATH}" \
- deploy -Dmaven.test.skip
- env:
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- ARTIFACT_URL: "${{ secrets.ARTIFACT_URL }}"
- ARTIFACT_REPO_PATH: "${{ secrets.ARTIFACT_REPO_PATH }}"
- ARTIFACT_USER: "${{ secrets.ARTIFACT_USER }}"
- ARTIFACT_PASSWORD: "${{ secrets.ARTIFACT_PASSWORD }}"
- project: "${{ matrix.artifact_name }}"
-
-
-
-
-
-
diff --git a/.github/workflows/bld_maven.yml b/.github/workflows/bld_mvn.yml
similarity index 85%
rename from .github/workflows/bld_maven.yml
rename to .github/workflows/bld_mvn.yml
index 4683cb8898b..5638a7b0dc8 100644
--- a/.github/workflows/bld_maven.yml
+++ b/.github/workflows/bld_mvn.yml
@@ -1,5 +1,4 @@
-name: bld_maven
-run-name: bld-{{ inputs.project }}
+name: bld_mvn
permissions:
checks: write
@@ -10,18 +9,13 @@ permissions:
on:
workflow_call:
inputs:
- project:
- description: 'Name of the artifact env'
- required: false
- default: 'prod'
- type: string
version_tag:
- description: 'Name of the tag to build'
+ description: 'Version tag to use: (bump must also be set to none to keep a specific version'
required: false
default: 'latest'
type: string
bump:
- description: 'whether to bump the version number by a major minor patch amount or none'
+ description: 'whether to bump the version number by a major minor patch'
required: false
default: 'patch'
type: string
@@ -40,15 +34,14 @@ on:
type: boolean
required: false
default: true
-
+ deploy:
+ description: Whether to deploy the build to artifact repo
+ type: boolean
+ required: false
+ default: true
workflow_dispatch:
inputs:
- project:
- description: 'Name of the artifact env'
- required: false
- default: 'prod'
- type: string
version_tag:
description: 'Version tag to use: (bump must also be set to none to keep a specific version'
required: false
@@ -80,10 +73,29 @@ on:
type: boolean
required: false
default: true
-
+ deploy:
+ description: Whether to deploy the build to artifact repo
+ type: boolean
+ required: false
+ default: true
jobs:
- bld_maven:
+ bld_mvn:
+ strategy:
+ matrix:
+ include:
+ - project: orcid-message-listener
+ - project: orcid-activemq
+ - project: orcid-api-web
+ - project: orcid-internal-api
+ - project: orcid-pub-web
+ - project: orcid-scheduler-web
+ - project: orcid-web
+ - project: orcid-utils
+ - project: orcid-core
+ - project: orcid-persistence
+ - project: orcid-api-common
+
runs-on: ubuntu-latest
steps:
- name: git-checkout-ref-action
@@ -93,7 +105,7 @@ jobs:
default_branch: ${{ github.event.repository.default_branch }}
ref: ${{ inputs.ref }}
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
ref: ${{ steps.ref.outputs.ref }}
# checkout some history so we can scan commits for bump messages
@@ -108,7 +120,7 @@ jobs:
bump: ${{ inputs.bump }}
- name: Set up Open JDK 11
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
@@ -117,7 +129,7 @@ jobs:
- name: if not installing dependencies restore special previous git_sha cache
if: ${{ ! inputs.install_maven_dependencies }}
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ steps.version.outputs.version_tag_numeric }}-${{ github.sha }}
@@ -136,7 +148,7 @@ jobs:
- name: if installing dependencies use a standard cache key name
if: ${{ inputs.install_maven_dependencies }}
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-seed-cache
@@ -167,20 +179,20 @@ jobs:
find . -name '*.war'
find . -name '*.jar'
env:
- project: "${{ inputs.project }}"
+ project: "${{ matrix.project }}"
#
# orcid-web customization
#
- name: setup node for angular static file
- if: ${{ inputs.project == 'orcid-web' }}
- uses: actions/setup-node@v3
+ if: ${{ matrix.project == 'orcid-web' }}
+ uses: actions/setup-node@v4
with:
node-version: 18.7.0
- name: build angular parts if we are building orcid-web
- if: ${{ inputs.project == 'orcid-web' }}
+ if: ${{ matrix.project == 'orcid-web' }}
run: |
echo "Build angular_orcid_generated.js"
cd orcid-nodejs
@@ -208,11 +220,12 @@ jobs:
env:
version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
- project: "${{ inputs.project }}"
+ project: "${{ matrix.project }}"
##################################################################################################################
- name: deploy war file
+ if: ${{ inputs.deploy }}
run: |
mvn --batch-mode \
--settings settings-deploy.xml \
@@ -227,5 +240,6 @@ jobs:
ARTIFACT_REPO_PATH: "${{ secrets.ARTIFACT_REPO_PATH }}"
ARTIFACT_USER: "${{ secrets.ARTIFACT_USER }}"
ARTIFACT_PASSWORD: "${{ secrets.ARTIFACT_PASSWORD }}"
- project: "${{ inputs.project }}"
+ project: "${{ matrix.project }}"
+
diff --git a/.github/workflows/build_debug.yml b/.github/workflows/build_debug.yml
deleted file mode 100644
index fd8f1815b51..00000000000
--- a/.github/workflows/build_debug.yml
+++ /dev/null
@@ -1,101 +0,0 @@
-name: build_debug
-
-on:
- workflow_call:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: "latest"
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or try gitlog'
- required: false
- default: "patch"
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: "latest"
- type: string
- bump:
- description: |
- How to optionally bump the semver version ( Major.Minor.Patch ) : git log will be searched for
- '#major #minor #patch' or feat/ or fix/ branch names to optionally override the bump. Set to none to keep a specific version
- required: false
- options:
- - patch
- - minor
- - major
- - none
- type: choice
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default_branch"
- type: string
-
-
-# cancel running job if another commit comes in
-concurrency:
- group: main-${{ github.ref }}-1
- cancel-in-progress: true
-
-jobs:
- seed_maven_cache:
- uses: ./.github/workflows/seed_maven_cache.yml
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- install_maven_dependencies:
- uses: ./.github/workflows/install_maven_dependencies.yml
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- needs:
- - seed_maven_cache
-
-
-##############################################################################
-
- unit_tests_publish:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- project: orcid-message-listener
- seed_maven_cache: false
- install_maven_dependencies: false
- needs:
- - install_maven_dependencies
-
- bld_ml:
- uses: ./.github/workflows/bld_maven.yml
- secrets: inherit # pass all secrets for uploading assets
- needs:
- - seed_maven_cache
- - unit_tests_publish
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- project: orcid-message-listener
- seed_maven_cache: false
- install_maven_dependencies: false
diff --git a/.github/workflows/build_test_release.yml b/.github/workflows/build_test_release.yml
deleted file mode 100644
index 8b7ef2b2e64..00000000000
--- a/.github/workflows/build_test_release.yml
+++ /dev/null
@@ -1,119 +0,0 @@
-name: build_test_release
-
-on:
- workflow_call:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: "latest"
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or try gitlog'
- required: false
- default: "patch"
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: "latest"
- type: string
- bump:
- description: |
- How to optionally bump the semver version ( Major.Minor.Patch ) : git log will be searched for
- '#major #minor #patch' or feat/ or fix/ branch names to optionally override the bump. Set to none to keep a specific version
- required: false
- options:
- - patch
- - minor
- - major
- - none
- type: choice
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default_branch"
- type: string
-
-
-# cancel running job if another commit comes in
-concurrency:
- group: main-${{ github.ref }}-1
- cancel-in-progress: true
-
-jobs:
-
- lint:
- uses: ./.github/workflows/lint.yml
-
- seed_maven_cache:
- uses: ./.github/workflows/seed_maven_cache.yml
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- install_maven_dependencies:
- uses: ./.github/workflows/install_maven_dependencies.yml
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- needs:
- - seed_maven_cache
-
- unit_tests_publish:
- uses: ./.github/workflows/unit_tests_publish.yml
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: false
- install_maven_dependencies: false
- needs:
- - lint
- - seed_maven_cache
- - install_maven_dependencies
-##############################################################################
- bld_all:
- uses: ./.github/workflows/bld_all.yml
- secrets: inherit # pass all secrets for uploading assets
- needs:
- - lint
- - unit_tests_publish
- - install_maven_dependencies
- permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
- seed_maven_cache: false
- install_maven_dependencies: false
-
-##############################################################################
-
-# rel_tag:
-# uses: ./.github/workflows/rel_tag.yml
-# needs: bld_all
-# with:
-# version_tag: ${{ inputs.version_tag }}
-# bump: ${{ inputs.bump }}
-# ref: ${{ inputs.ref }}
-# secrets: inherit # pass all secrets
-# permissions:
-# checks: write
-# contents: write
-# issues: read
-# pull-requests: write
diff --git a/.github/workflows/build_test_release_tag.yml b/.github/workflows/build_test_release_tag.yml
index 5a1665df619..ce821970320 100644
--- a/.github/workflows/build_test_release_tag.yml
+++ b/.github/workflows/build_test_release_tag.yml
@@ -18,6 +18,12 @@ on:
required: false
default: "default"
type: string
+ rel_tag:
+ description: Whether to tag the code
+ type: boolean
+ required: false
+ default: true
+
workflow_dispatch:
inputs:
@@ -42,7 +48,11 @@ on:
required: false
default: "default_branch"
type: string
-
+ rel_tag:
+ description: Whether to tag the code
+ type: boolean
+ required: false
+ default: true
# cancel running job if another commit comes in
concurrency:
@@ -70,8 +80,8 @@ jobs:
needs:
- seed_maven_cache
- unit_tests_publish:
- uses: ./.github/workflows/unit_tests_publish.yml
+ test_mvn:
+ uses: ./.github/workflows/test_mvn.yml
with:
version_tag: ${{ inputs.version_tag }}
bump: ${{ inputs.bump }}
@@ -83,12 +93,12 @@ jobs:
- seed_maven_cache
- install_maven_dependencies
##############################################################################
- bld_all:
- uses: ./.github/workflows/bld_all.yml
+ bld_mvn:
+ uses: ./.github/workflows/bld_mvn.yml
secrets: inherit # pass all secrets for uploading assets
needs:
- lint
- - unit_tests_publish
+ - test_mvn
- install_maven_dependencies
permissions:
checks: write
@@ -106,7 +116,8 @@ jobs:
rel_tag:
uses: ./.github/workflows/rel_tag.yml
- needs: bld_all
+ needs: bld_mvn
+ if: ${{ inputs.rel_tag }}
with:
version_tag: ${{ inputs.version_tag }}
bump: ${{ inputs.bump }}
@@ -117,3 +128,4 @@ jobs:
contents: write
issues: read
pull-requests: write
+
diff --git a/.github/workflows/install_maven_dependencies.yml b/.github/workflows/install_maven_dependencies.yml
index 265c72c3a20..7c3332bdbdb 100644
--- a/.github/workflows/install_maven_dependencies.yml
+++ b/.github/workflows/install_maven_dependencies.yml
@@ -73,7 +73,7 @@ jobs:
default_branch: ${{ github.event.repository.default_branch }}
ref: ${{ inputs.ref }}
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
ref: ${{ steps.ref.outputs.ref }}
# checkout some history so we can scan commits for bump messages
@@ -88,13 +88,13 @@ jobs:
bump: ${{ inputs.bump }}
- name: Set up Open JDK 11
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Restore the seeded cache but save dependencies into a new unique git sha hash with the expected version of the build
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ steps.version.outputs.version_tag_numeric }}-${{ github.sha }}
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index a75a9f27b19..f7e9c0d9a33 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -16,17 +16,8 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
with:
python-version: '3.10'
- - name: set PY
- run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV"
- - uses: actions/cache@v3
- with:
- path: ~/.cache
- key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- # lockdown all 3rd party repos to git shas
- #- uses: cloudposse/github-action-pre-commit@32acf3179b9eda817c0f549e8057477d320827db
- # migrate to standard pre-commit
- - uses: pre-commit/action@5f528da5c95691c4cf42ff76a4d10854b62cbb82
+ - uses: pre-commit/action@576ff52938d158a24ac7e009dfa94b1455e7df99
diff --git a/.github/workflows/maven_test_artifact.yml b/.github/workflows/maven_test_artifact.yml
deleted file mode 100644
index c13b03e6538..00000000000
--- a/.github/workflows/maven_test_artifact.yml
+++ /dev/null
@@ -1,167 +0,0 @@
-name: maven_test_artifact
-
-# run maven tests and upload results as an artifact
-# can be run from a pr
-
-permissions:
- checks: write
- contents: read
- issues: read
- pull-requests: write
-
-on:
- workflow_call:
- inputs:
- project:
- description: 'Name of the artifact env'
- required: false
- default: 'prod'
- type: string
- version_tag:
- description: 'Name of the tag to build'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or none'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
- workflow_dispatch:
- inputs:
- project:
- description: 'Name of the artifact env'
- required: false
- default: 'prod'
- type: string
- version_tag:
- description: 'Name of the tag to build'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or none'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
-
-jobs:
- maven_test:
- runs-on: ubuntu-latest
- steps:
- - name: git-checkout-ref-action
- id: ref
- uses: ORCID/git-checkout-ref-action@main
- with:
- default_branch: ${{ github.event.repository.default_branch }}
- ref: ${{ inputs.ref }}
-
- - uses: actions/checkout@v3
- with:
- ref: ${{ steps.ref.outputs.ref }}
- # checkout some history so we can scan commits for bump messages
- # NOTE: history does not include tags!
- fetch-depth: 100
-
- - name: find next version
- id: version
- uses: ORCID/version-bump-action@main
- with:
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
-
- - name: Set up Open JDK 11
- uses: actions/setup-java@v3
- with:
- distribution: 'temurin'
- java-version: '11'
-
-########################################################################################
-# handle restoring a custom gha cache
-
- - name: if not installing dependencies restore special previous git_sha cache
- if: ${{ ! inputs.install_maven_dependencies }}
- uses: actions/cache@v3
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ steps.version.outputs.version_tag_numeric }}-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ steps.version.outputs.version_tag_numeric }}-${{ github.sha }}
-
- - name: bump version of the parent pom and connected projects
- if: ${{ ! inputs.install_maven_dependencies }}
- run: |
- mvn -T 1C --batch-mode versions:set -DskipTests \
- -DnewVersion="$version_tag_numeric" -DgenerateBackupPoms=false
- env:
- version_tag_numeric: "${{ steps.version.outputs.version_tag_numeric }}"
-
-########################################################################################
-
- - name: if installing dependencies use a standard cache key name
- if: ${{ inputs.install_maven_dependencies }}
- uses: actions/cache@v3
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-seed-cache
- restore-keys: |
- ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-seed-cache
-
- - name: seed_maven_cache
- if: ${{ inputs.seed_maven_cache }}
- id: cache
- uses: ORCID/ORCID-Source-cache-action@main
- with:
- version_tag_numeric: ${{ steps.version.outputs.version_tag_numeric }}
-
- - name: install_dependencies and bump version
- if: ${{ inputs.install_maven_dependencies }}
- id: install_dependencies
- uses: ORCID/ORCID-Source-dependencies-action@main
- with:
- version_tag_numeric: ${{ steps.version.outputs.version_tag_numeric }}
-
-########################################################################################
- - name: "Test ${{ inputs.project }}"
- run: |
- mvn -T 1C --batch-mode -Dmaven.test.failure.ignore=true test \
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects ${{ inputs.project }}
-
- - uses: actions/upload-artifact@v3 # upload test results
- if: success() || failure() # run this step even if previous step failed
- with:
- name: ${{ inputs.project }}
- path: ${{ inputs.project }}/target/surefire-reports/*.xml
diff --git a/.github/workflows/maven_test_report.yml b/.github/workflows/maven_test_report.yml
deleted file mode 100644
index e44b1f70c99..00000000000
--- a/.github/workflows/maven_test_report.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: unit_test_report
-
-on:
- workflow_call:
- inputs:
- project:
- description: 'Name of the project in the repo'
- required: false
- default: "."
- type: string
-
- workflow_dispatch:
- inputs:
- project:
- description: 'Name of the project in the repo'
- required: false
- default: "."
- type: string
-
-jobs:
- report:
- runs-on: ubuntu-latest
- steps:
- - uses: dorny/test-reporter@e9fa2f582c0ebbe2e263fd18fad744d52e0b0203
- with:
- artifact: ${{ inputs.project }}
- name: "maven_test_report_${{ inputs.project }}" # Name of the check run which will be created
- path: '*.xml' # Path to test results (inside artifact .zip)
- reporter: java-junit # Format of test results
-
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index c243064af80..4b13881b9b4 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -17,8 +17,11 @@ concurrency:
cancel-in-progress: true
jobs:
- unit_tests_artifact:
- uses: ./.github/workflows/unit_tests_artifact.yml
+ lint:
+ uses: ./.github/workflows/lint.yml
+
+ test_mvn:
+ uses: ./.github/workflows/test_mvn.yml
with:
seed_maven_cache: true
install_maven_dependencies: true
diff --git a/.github/workflows/pr_completed.yml b/.github/workflows/pr_completed.yml
deleted file mode 100644
index 3d007a37690..00000000000
--- a/.github/workflows/pr_completed.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: pr_completed
-
-# this is a privileged workflow that can run with secrets
-# to perform actions on work carried out in the pull_request workflow
-
-on:
- workflow_run:
- workflows:
- - pr
- types:
- - completed
-
- workflow_call:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: "next_tag"
- type: string
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: "next_tag"
- type: string
-
-jobs:
- unit_tests_report:
- uses: ./.github/workflows/unit_tests_report.yml
-
diff --git a/.github/workflows/rel_tag.yml b/.github/workflows/rel_tag.yml
index e125ac11d9a..529dc0bafb2 100644
--- a/.github/workflows/rel_tag.yml
+++ b/.github/workflows/rel_tag.yml
@@ -64,7 +64,7 @@ jobs:
ref: ${{ inputs.ref }}
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
# token with write permissions to protected branches
# standard github token does not allow this
diff --git a/.github/workflows/seed_maven_cache.yml b/.github/workflows/seed_maven_cache.yml
index aaf8d64d3b1..55eae9d17e3 100644
--- a/.github/workflows/seed_maven_cache.yml
+++ b/.github/workflows/seed_maven_cache.yml
@@ -71,7 +71,7 @@ jobs:
default_branch: ${{ github.event.repository.default_branch }}
ref: ${{ inputs.ref }}
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
ref: ${{ steps.ref.outputs.ref }}
# checkout some history so we can scan commits for bump messages
@@ -86,13 +86,13 @@ jobs:
bump: ${{ inputs.bump }}
- name: Set up Open JDK 11
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Cache local Maven repository keyed off the pom
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-seed-cache
diff --git a/.github/workflows/maven_test_publish.yml b/.github/workflows/test_mvn.yml
similarity index 73%
rename from .github/workflows/maven_test_publish.yml
rename to .github/workflows/test_mvn.yml
index 33a6c1132d6..65e1190174c 100644
--- a/.github/workflows/maven_test_publish.yml
+++ b/.github/workflows/test_mvn.yml
@@ -1,22 +1,13 @@
-name: maven_test_publish
-
-# run maven tests and publish results in one step
-# run from privileged branch
+name: test_mvn
permissions:
checks: write
contents: read
- issues: read
- pull-requests: write
+ actions: read
on:
workflow_call:
inputs:
- project:
- description: 'Name of the artifact env'
- required: false
- default: 'prod'
- type: string
version_tag:
description: 'Name of the tag to build'
required: false
@@ -45,11 +36,6 @@ on:
workflow_dispatch:
inputs:
- project:
- description: 'Name of the artifact env'
- required: false
- default: 'prod'
- type: string
version_tag:
description: 'Name of the tag to build'
required: false
@@ -78,7 +64,22 @@ on:
jobs:
- maven_test:
+ test_mvn:
+ strategy:
+ matrix:
+ include:
+ - project: orcid-message-listener
+ - project: orcid-activemq
+ - project: orcid-api-web
+ - project: orcid-internal-api
+ - project: orcid-pub-web
+ - project: orcid-scheduler-web
+ - project: orcid-web
+ - project: orcid-utils
+ - project: orcid-core
+ - project: orcid-persistence
+ - project: orcid-api-common
+
runs-on: ubuntu-latest
steps:
- name: git-checkout-ref-action
@@ -88,7 +89,7 @@ jobs:
default_branch: ${{ github.event.repository.default_branch }}
ref: ${{ inputs.ref }}
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
ref: ${{ steps.ref.outputs.ref }}
# checkout some history so we can scan commits for bump messages
@@ -103,7 +104,7 @@ jobs:
bump: ${{ inputs.bump }}
- name: Set up Open JDK 11
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
@@ -113,7 +114,7 @@ jobs:
- name: if not installing dependencies restore special previous git_sha cache
if: ${{ ! inputs.install_maven_dependencies }}
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ steps.version.outputs.version_tag_numeric }}-${{ github.sha }}
@@ -132,7 +133,7 @@ jobs:
- name: if installing dependencies use a standard cache key name
if: ${{ inputs.install_maven_dependencies }}
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-seed-cache
@@ -154,19 +155,24 @@ jobs:
version_tag_numeric: ${{ steps.version.outputs.version_tag_numeric }}
########################################################################################
- - name: "Test ${{ inputs.project }}"
+ - name: "Test ${{ matrix.project }}"
run: |
- mvn -T 1C --batch-mode -Dmaven.test.failure.ignore=true test \
+ mvn -T 1C --batch-mode test \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
- --projects ${{ inputs.project }}
+ --projects ${{ matrix.project }} --fail-at-end
- # NOTE: if the above test fail then this step will report that failure and stop the run
- - name: Publish Unit Test Results
- uses: dorny/test-reporter@e9fa2f582c0ebbe2e263fd18fad744d52e0b0203
- if: always()
+ - name: Publish unit test report for non forked repo
+ if: ${{ failure() && (github.event.pull_request.head.repo.full_name == github.repository) }} # only report if a test has failed and we are a non forked repo
+ uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1
with:
- name: "maven_test_publish_${{ inputs.project }}"
- path: ${{ inputs.project }}/target/surefire-reports/*.xml
+ name: "Unit test report for ${{ matrix.project }}"
+ path: ${{ matrix.project }}/target/surefire-reports/*.xml
reporter: java-junit
fail-on-error: true
+ - name: Annotate only test report for forked repo
+ uses: mikepenz/action-junit-report@ec3a351c13e080dc4fa94c49ab7ad5bf778a9668 # v5
+ if: ${{ failure() && (github.event.pull_request.head.repo.full_name != github.repository) }} # only report if a test has failed and we are a forked repo
+ with:
+ report_paths: ${{ matrix.project }}/target/surefire-reports/*.xml
+ annotate_only: true # forked repo cannot write to checks so just do annotations
diff --git a/.github/workflows/unit_tests_artifact.yml b/.github/workflows/unit_tests_artifact.yml
deleted file mode 100644
index 2340da69799..00000000000
--- a/.github/workflows/unit_tests_artifact.yml
+++ /dev/null
@@ -1,144 +0,0 @@
-name: unit_tests_artifact
-
-# Run tests and upload the results as an artifact
-# Can be run from a unprivileged pull_request action
-# Reporting is done in the pr_completed.yml workflow
-
-on:
- workflow_call:
- inputs:
- version_tag:
- description: 'Name of the tag to build'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or none'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'Name of the tag to build'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or none'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
-jobs:
- tst_ml:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-message-listener
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_amq:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-activemq
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_api:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-api-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_iapi:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-internal-api
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_pubweb:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-pub-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_sched:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-scheduler-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_web:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-##########################################################
-
- tst_utils:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-utils
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_core:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-core
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_persistence:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-persistence
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
- tst_api_common:
- uses: ./.github/workflows/maven_test_artifact.yml
- with:
- project: orcid-api-common
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
-
-
diff --git a/.github/workflows/unit_tests_publish.yml b/.github/workflows/unit_tests_publish.yml
deleted file mode 100644
index e8cdbcdf91d..00000000000
--- a/.github/workflows/unit_tests_publish.yml
+++ /dev/null
@@ -1,180 +0,0 @@
-name: unit_tests_publish
-
-# full unit tests with report publishing
-
-on:
- workflow_call:
- inputs:
- version_tag:
- description: 'Name of the tag to build'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or none'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'Name of the tag to build'
- required: false
- default: 'latest'
- type: string
- bump:
- description: 'whether to bump the version number by a major minor patch amount or none'
- required: false
- default: 'patch'
- type: string
- ref:
- description: 'git reference to use with the checkout use default_branch to have that calculated'
- required: false
- default: "default"
- type: string
- seed_maven_cache:
- description: Whether to seed cache
- type: boolean
- required: false
- default: true
- install_maven_dependencies:
- description: Whether to install dependencies or use a previous cache
- type: boolean
- required: false
- default: true
-
-jobs:
-
-
- tst_ml:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-message-listener
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_amq:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-activemq
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_api:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-api-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_iapi:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-internal-api
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_pubweb:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-pub-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_sched:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-scheduler-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_web:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-web
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
-####################################################################
-
- tst_utils:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-utils
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_core:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-core
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_persistence:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-persistence
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
- tst_api_common:
- uses: ./.github/workflows/maven_test_publish.yml
- with:
- project: orcid-api-common
- seed_maven_cache: ${{ inputs.seed_maven_cache }}
- install_maven_dependencies: ${{ inputs.install_maven_dependencies }}
- version_tag: ${{ inputs.version_tag }}
- bump: ${{ inputs.bump }}
- ref: ${{ inputs.ref }}
-
-# codeql:
-# uses: ./.github/workflows/codeql.yml
-#
diff --git a/.github/workflows/unit_tests_report.yml b/.github/workflows/unit_tests_report.yml
deleted file mode 100644
index f3c5149dd01..00000000000
--- a/.github/workflows/unit_tests_report.yml
+++ /dev/null
@@ -1,78 +0,0 @@
-name: unit_tests_report
-
-on:
- workflow_call:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: latest
- type: string
-
- workflow_dispatch:
- inputs:
- version_tag:
- description: 'version tag to use(vx.x.x)'
- required: false
- default: latest
- type: string
-
-jobs:
-
- tst_ml:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-message-listener
-
- tst_amq:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-activemq
-
- tst_api:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-api-web
-
- tst_iapi:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-internal-api
-
- tst_pubweb:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-pub-web
-
- tst_sched:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-scheduler-web
-
- tst_web:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-web
-
-#########################################################################################
-
- tst_utils:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-utils
-
- tst_core:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-core
-
- tst_persistence:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-persistence
-
- tst_api_common:
- uses: ./.github/workflows/maven_test_report.yml
- with:
- project: orcid-api-common
-
diff --git a/.tool-versions b/.tool-versions
index 5732f21e547..5299f598cf8 100644
--- a/.tool-versions
+++ b/.tool-versions
@@ -1,4 +1,8 @@
-nodejs 18.7.0
+# RUN export ASDF_NODEJS_AUTO_ENABLE_COREPACK=yes
+# RUN export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
+nodejs 20.15.0
+# RUN corepack enable
+# RUN asdf reshim nodejs
java temurin-11.0.15+10
maven 3.6.3
mvnd 0.9.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aec7e03e174..dd0dad40de8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,34 @@
+## v2.68.1 - 2024-11-13
+
+[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.68.0...v2.68.1)
+
+## v2.68.0 - 2024-11-13
+
+[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.67.16...v2.68.0)
+
+## v2.67.16 - 2024-11-08
+
+[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.67.15...v2.67.16)
+
+## v2.67.15 - 2024-11-08
+
+[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.67.14...v2.67.15)
+
+- [#7133](https://github.com/ORCID/ORCID-Source/pull/7133): lmendoza/9453-update-node-version
+- [#7130](https://github.com/ORCID/ORCID-Source/pull/7130): refactor/matrix-and-fork-detection-bldtest
+
+### Feature
+
+- helper command comments for yarn corepack install
+
+## v2.67.14 - 2024-11-07
+
+[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.67.13...v2.67.14)
+
+## v2.67.13 - 2024-11-07
+
+[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.67.12...v2.67.13)
+
## v2.67.12 - 2024-11-06
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.67.11...v2.67.12)
diff --git a/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java b/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java
index 3fcd322e53d..c815b9e24bf 100644
--- a/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java
+++ b/orcid-core/src/main/java/org/orcid/core/common/manager/impl/SummaryManagerImpl.java
@@ -43,11 +43,7 @@
import org.orcid.core.utils.JsonUtils;
import org.orcid.core.utils.cache.redis.RedisClient;
import org.orcid.core.utils.v3.SourceUtils;
-import org.orcid.jaxb.model.v3.release.common.CreatedDate;
-import org.orcid.jaxb.model.v3.release.common.FuzzyDate;
-import org.orcid.jaxb.model.v3.release.common.LastModifiedDate;
-import org.orcid.jaxb.model.v3.release.common.Source;
-import org.orcid.jaxb.model.v3.release.common.Visibility;
+import org.orcid.jaxb.model.v3.release.common.*;
import org.orcid.jaxb.model.v3.release.record.AffiliationType;
import org.orcid.jaxb.model.v3.release.record.Group;
import org.orcid.jaxb.model.v3.release.record.GroupableActivity;
@@ -286,6 +282,7 @@ public RecordSummaryPojo getRecordSummaryPojo(String orcid) {
for (EmailDomain ed : recordSummary.getEmailDomains().getEmailDomains()) {
EmailDomainSummary eds = new EmailDomainSummary();
eds.setValue(ed.getValue());
+ eds.setVerificationDate(ed.getVerificationDate().toString());
emailDomains.add(eds);
}
}
@@ -524,6 +521,7 @@ public void generateEmailDomainsSummary(RecordSummary recordSummary, String orci
for (ProfileEmailDomainEntity ped : emailDomains) {
ed = new EmailDomain();
ed.setValue(ped.getEmailDomain());
+ ed.setVerificationDate( new VerificationDate(DateUtils.convertToXMLGregorianCalendar(ped.getDateCreated())));
edList.add(ed);
}
}
@@ -531,6 +529,7 @@ public void generateEmailDomainsSummary(RecordSummary recordSummary, String orci
edList.stream().limit(3).forEach(t -> {
EmailDomain ed = new EmailDomain();
ed.setValue(t.getValue());
+ ed.setVerificationDate(t.getVerificationDate());
emailDomainsTop3.add(ed);
});
@@ -538,7 +537,6 @@ public void generateEmailDomainsSummary(RecordSummary recordSummary, String orci
eds.setCount(edList.size());
if (!emailDomainsTop3.isEmpty()) {
eds.setEmailDomains(emailDomainsTop3);
-
}
recordSummary.setEmailDomains(eds);
diff --git a/orcid-core/src/main/java/org/orcid/core/manager/v3/impl/ProfileEmailDomainManagerImpl.java b/orcid-core/src/main/java/org/orcid/core/manager/v3/impl/ProfileEmailDomainManagerImpl.java
index ecbf129bd04..e4adee923e8 100644
--- a/orcid-core/src/main/java/org/orcid/core/manager/v3/impl/ProfileEmailDomainManagerImpl.java
+++ b/orcid-core/src/main/java/org/orcid/core/manager/v3/impl/ProfileEmailDomainManagerImpl.java
@@ -42,6 +42,9 @@ public class ProfileEmailDomainManagerImpl extends ProfileEmailDomainManagerRead
@Transactional
public void updateEmailDomains(String orcid, org.orcid.pojo.ajaxForm.Emails newEmails) {
+ if (orcid == null || orcid.isBlank()) {
+ throw new IllegalArgumentException("ORCID must not be empty");
+ }
List
- <@emailMacros.msg "email.common.you_have_received_this_email" /> -
-<#include "email_footer_html.ftl"/>
diff --git a/orcid-core/src/test/java/org/orcid/core/common/manager/SummaryManagerTest.java b/orcid-core/src/test/java/org/orcid/core/common/manager/SummaryManagerTest.java index 61e4ac2e8f1..f6367c52d44 100644 --- a/orcid-core/src/test/java/org/orcid/core/common/manager/SummaryManagerTest.java +++ b/orcid-core/src/test/java/org/orcid/core/common/manager/SummaryManagerTest.java @@ -15,6 +15,7 @@ import javax.annotation.Resource; import javax.xml.datatype.XMLGregorianCalendar; +import com.oracle.truffle.api.profiles.Profile; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; @@ -81,6 +82,7 @@ public class SummaryManagerTest { private final String ORCID = "0000-0000-0000-0000"; private final String CLIENT1 = "APP-0000"; + private final String EMAIL_DOMAIN = "orcid.org"; public SummaryManagerImpl manager = new SummaryManagerImpl(); @@ -165,10 +167,9 @@ public void setUp() { ReflectionTestUtils.setField(manager, "researchResourceManagerReadOnly", researchResourceManagerReadOnlyMock); // Set EmailDomains - EmailDomains emailDomains = getEmailDomains(); - Mockito.when(profileEmailDomainManagerReadOnlyMock.getPublicEmailDomains(Mockito.eq(ORCID))).thenReturn(new ArrayList