Skip to content

Commit

Permalink
fix bld
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesw committed Nov 20, 2024
1 parent fbd718f commit 0382e8c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 85 deletions.
85 changes: 0 additions & 85 deletions .github/workflows/bld_mvn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,50 +117,6 @@ jobs:
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@v4
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@v4
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: build our project
run: |
Expand All @@ -174,47 +130,6 @@ jobs:
env:
project: "${{ matrix.project }}"

#
# orcid-web customization
#

- name: setup node for angular static file
if: ${{ matrix.project == '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.project == '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.project }}"

##################################################################################################################

- name: deploy war file
Expand Down
26 changes: 26 additions & 0 deletions settings-deploy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">

<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${env.ARTIFACT_USER}</username>
<password>${env.ARTIFACT_PASSWORD}</password>
</server>
</servers>

</settings>

0 comments on commit 0382e8c

Please sign in to comment.