Skip to content

Commit

Permalink
Only deploy when set
Browse files Browse the repository at this point in the history
  • Loading branch information
alerman committed Sep 27, 2024
1 parent a47e44f commit ac1e305
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/build-accumulo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ name: Build Accumulo snapshot and update DataWave to use
on:
push:
branches:
- accumulo-builds
- '**'
workflow_dispatch:
inputs:
accumuloBranch:
required: true
required: false
description: "Branch name to build. Will be used as image tag."
accumuloRepo:
required: false
description: "Accumulo Repo to use. Expected to be at Github. Example: apache/accumulo"
deployAccumulo:
required: false
description: "Set to false if this accumulo version has already been pushed to Github Packages"
schedule:
- cron: "0 0 * * *"

Expand Down Expand Up @@ -52,26 +55,29 @@ jobs:
distribution: ${{env.JAVA_DISTRIBUTION}}
java-version: ${{env.JAVA_VERSION}}
cache: 'maven'
- name: Build Accumulo
id: build-accumulo
- name: Get Accumulo Version
id: get-accumulo-version
run: |
cd $GITHUB_WORKSPACE/accumulo
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion}-$(git rev-parse --short HEAD)
export NEWVERSION=$(mvn -q help:evaluate -DforceStdout -Dexpression=project.version)
echo accumuloversion=$NEWVERSION >> $GITHUB_OUTPUT
echo $NEWVERSION
- name: Deploy Accumulo
if: ${{ ( github.event.inputs.deployAccumulo || 'false' ) == 'true'}}
run: |
cd $GITHUB_WORKSPACE/accumulo
mvn -DaltDeploymentRepository=github-datawave::https://maven.pkg.github.com/NationalSecurityAgency/datawave -V -B -e -ntp "-Dstyle.color=always" -DskipTests -T1C clean deploy -s $GITHUB_WORKSPACE/datawave/.github/workflows/settings.xml
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USER_NAME }}
password: ${{ env.ACCESS_TOKEN }}

- name: Update DataWave Dependency Version
run: |
cd $GITHUB_WORKSPACE/datawave
mvn -s $GITHUB_WORKSPACE/datawave/.github/workflows/settings.xml versions:set-property -Dproperty=version.accumulo -DnewVersion=${{ steps.build-accumulo.outputs.accumuloversion }} -DgenerateBackupPoms=false
mvn -s $GITHUB_WORKSPACE/datawave/.github/workflows/settings.xml versions:set-property -Dproperty=version.accumulo -DnewVersion=${{ steps.get-accumulo-version.outputs.accumuloversion }} -DgenerateBackupPoms=false
- name: Build Web and Ingest Docker Images (Maven)
run: |
cd $GITHUB_WORKSPACE/datawave
Expand Down

0 comments on commit ac1e305

Please sign in to comment.