Skip to content

Commit

Permalink
Merge pull request #3898 from LinuxForHealth/lee-main
Browse files Browse the repository at this point in the history
Miscelanous build, install, and actions workflow edits
  • Loading branch information
lmsurpre authored Aug 19, 2022
2 parents 673bb7d + b8887b5 commit cd709ac
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 16 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ jobs:
JAVADOC_GOAL=""
if [ "${{ matrix.java }}" = "11" ]
then
export OLD_JAVA_HOME=/opt/hostedtoolcache/AdoptOpenJDK/1.0.0-ga-11-jdk-hotspot-linux-x64-normal-latest/x64/
JAVADOC_GOAL=" -Pvalidate-javadoc javadoc:javadoc "
fi
mvn -B org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline -f fhir-parent --no-transfer-progress -DexcludeReactor=true -Dmaven.wagon.http.retryHandler.count=3
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
- name: Build fhir-parent without tests
run: |
cd fhir
export OLD_JAVA_HOME=/opt/hostedtoolcache/AdoptOpenJDK/1.0.0-ga-11-jdk-hotspot-linux-x64-normal-latest/x64/
mvn -ntp -B -N -Pset-version-release clean -f fhir-parent -Ddeploy.version=${TAG_VERSION} -Dfhir-tools.version=${TAG_VERSION} -Dmaven.wagon.http.retryHandler.count=3
mvn -ntp -DskipTests -B clean install org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc-no-fork org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:test-javadoc-no-fork org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:aggregate -f fhir-parent -Ddeploy.version=${TAG_VERSION} -Dfhir-tools.version=${TAG_VERSION} -Dmaven.wagon.http.retryHandler.count=3
cp -R fhir-parent/target/site/apidocs ../apidocs/
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/javadocs_force_build.txt

This file was deleted.

53 changes: 47 additions & 6 deletions .github/workflows/rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,48 @@ permissions:
packages: write

jobs:
image-refresh:
ghcr:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11' ]
tag: [ '5.0.0-RC1' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
ref: refs/tags/${{ matrix.tag }}
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Release
env:
BASE: origin/${{ github['base_ref'] }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
GPG_KEY_FILE: ${{ secrets.GPG_KEY_FILE }}
run: |
# set GITHUB_REF so we can use the same logic we use for our tag-push release
export GITHUB_REF=refs/tags/${{ matrix.tag }}
. build/release/global.sh
bash build/release/00_prep.sh
bash build/release/10_build.sh
bash build/release/20_test.sh
# go straight to the docker release instead of calling 30_release.sh
# which uploads the build artifacts to Sonatype OSSRH in the tag release workflow
bash build/release/bin/30_release/1_docker.sh
bash build/release/40_drop.sh
dockerhub:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -29,18 +70,18 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Release
env:
BASE: origin/${{ github['base_ref'] }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
GPG_KEY_FILE: ${{ secrets.GPG_KEY_FILE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OLD_JAVA_HOME: /opt/hostedtoolcache/AdoptOpenJDK/1.0.0-ga-11-jdk-hotspot-linux-x64-normal-latest/x64/
run: |
# set GITHUB_REF so we can use the same logic we use for our tag-push release
export GITHUB_REF=refs/tags/${{ matrix.tag }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Release
env:
Expand All @@ -47,7 +47,6 @@ jobs:
GPG_KEY_FILE: ${{ secrets.GPG_KEY_FILE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OLD_JAVA_HOME: /opt/hostedtoolcache/AdoptOpenJDK/1.0.0-ga-11-jdk-hotspot-linux-x64-normal-latest/x64/
run: |
. build/release/global.sh
bash build/release/00_prep.sh
Expand Down
3 changes: 2 additions & 1 deletion build/release/bin/30_release/0_sonatype.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ fi
# we hit 'gpg: signing failed: Cannot allocate memory' when running -T2C
export BUILD_PROFILES=" $(jq -r '.build[] | select(.type == "fhir-parent").profiles | map(.) | join(",")' build/release/config/release.json)"
export BUILD_PROFILES="${BUILD_PROFILES},deploy-to-sonatype"
mvn package war:war source:jar source:test-jar javadoc:jar gpg:sign deploy \
mvn package source:jar source:test-jar javadoc:jar gpg:sign deploy \
-DadditionalJOption=-Xdoclint:none \
-DretryFailedDeploymentCount=3
-f fhir-parent -P "${BUILD_PROFILES}" -DskipTests

# EOF
3 changes: 0 additions & 3 deletions build/release/config/release.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
"type": "jvm"
}
],
"java": {
"OLD_JAVA_HOME": "/opt/hostedtoolcache/AdoptOpenJDK/1.0.0-ga-11-jdk-hotspot-linux-x64-normal-latest/x64"
},
"build": [
{
"type": "fhir-tools",
Expand Down
2 changes: 1 addition & 1 deletion fhir-install/src/main/resources/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Executing $0 to deploy the fhir-server web application...

# Determine the location of this script.
# basedir=`dirname "$0"`
cd $(dirname $0); basedir="$(pwd)/"
cd $(dirname $0); basedir="$(pwd)"

# Default liberty install location
UNZIP_LOC=`unset CDPATH; cd "$basedir/.." && pwd`
Expand Down

0 comments on commit cd709ac

Please sign in to comment.