From 0382e8c96e3c0877035e4a84174c307d26bbb5ec Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Wed, 20 Nov 2024 10:50:37 +0000 Subject: [PATCH] fix bld --- .github/workflows/bld_mvn.yml | 85 ----------------------------------- settings-deploy.xml | 26 +++++++++++ 2 files changed, 26 insertions(+), 85 deletions(-) create mode 100644 settings-deploy.xml diff --git a/.github/workflows/bld_mvn.yml b/.github/workflows/bld_mvn.yml index e888a91..bc914cf 100644 --- a/.github/workflows/bld_mvn.yml +++ b/.github/workflows/bld_mvn.yml @@ -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: | @@ -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 diff --git a/settings-deploy.xml b/settings-deploy.xml new file mode 100644 index 0000000..9d8267d --- /dev/null +++ b/settings-deploy.xml @@ -0,0 +1,26 @@ + + + + + + github + + + + + github + + + + + + github + ${env.ARTIFACT_USER} + ${env.ARTIFACT_PASSWORD} + + + + +