You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/03/12 06:10:04 UTC

[isis-app-simpleapp] branch jdo-SNAPSHOT updated: makes 15 and 1.8 builds consistent

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch jdo-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git


The following commit(s) were added to refs/heads/jdo-SNAPSHOT by this push:
     new 853f4ee  makes 15 and 1.8 builds consistent
853f4ee is described below

commit 853f4ee38b0b82db77d7aeae37f7506ef97cea8f
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Mar 12 06:09:49 2021 +0000

    makes 15 and 1.8 builds consistent
---
 .github/workflows/mavenJdk15.yml | 16 +++++++++++++
 .github/workflows/mavenJdk8.yml  | 52 ++++++++++++++++++----------------------
 2 files changed, 39 insertions(+), 29 deletions(-)

diff --git a/.github/workflows/mavenJdk15.yml b/.github/workflows/mavenJdk15.yml
index ef898eb..68b4738 100644
--- a/.github/workflows/mavenJdk15.yml
+++ b/.github/workflows/mavenJdk15.yml
@@ -49,6 +49,13 @@ jobs:
     - name: Prepare Build Versions
       shell: bash
       run: |
+        ON_SNAPSHOT=$(echo $GITHUB_REF | grep SNAPSHOT)
+        if [[ $ON_SNAPSHOT != "" ]]
+        then
+          PARENT=$(curl -X GET "https://nexus.incode.work/service/rest/v1/search?sort=version&repository=nightly-builds&group=org.apache.isis.app&name=isis-app-starter-parent" -H "accept: application/json" -s | jq '.items[0].version' | sed 's/"//g')
+          echo "parentVersion = $PARENT"
+          mvn versions:update-parent -DparentVersion="[$PARENT]"
+        fi
         BASELINE=$(cat pom.xml | grep "<version>" | head -1 | awk -F'>' '{print $2}' | awk -F'<' '{print $1}')
         SHA_ID=$(echo $GITHUB_SHA | cut -c1-8)
         REVISION=${BASELINE}.$(date +%Y%m%d-%H%M)-${SHA_ID}
@@ -63,3 +70,12 @@ jobs:
       shell: bash
       run: |
         mvn install
+
+# uncomment and set environment variables to push to Docker registry
+#    - name: Build and Push Docker Image
+#      shell: bash
+#      run: |
+#        export REVISION=...
+#        export DOCKER_REGISTRY_USERNAME
+#        export DOCKER_REGISTRY_PASSWORD
+#        mvn -pl webapp -Ddocker jib:build
diff --git a/.github/workflows/mavenJdk8.yml b/.github/workflows/mavenJdk8.yml
index 161c681..6600221 100644
--- a/.github/workflows/mavenJdk8.yml
+++ b/.github/workflows/mavenJdk8.yml
@@ -23,14 +23,9 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - name: Checkout current repo
+    - name: Checkout repo
       uses: actions/checkout@v2.3.3
 
-    - name: Extract branch name
-      shell: bash
-      run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
-      id: extract_branch
-
     - name: Set up JDK 1.8
       uses: actions/setup-java@v1
       with:
@@ -57,31 +52,30 @@ jobs:
         ON_SNAPSHOT=$(echo $GITHUB_REF | grep SNAPSHOT)
         if [[ $ON_SNAPSHOT != "" ]]
         then
-          export REVISION=$(curl -X GET "https://nexus.incode.work/service/rest/v1/search?sort=version&repository=nightly-builds&group=org.apache.isis.app&name=isis-app-starter-parent" -H "accept: application/json" -s | jq '.items[0].version' | sed 's/"//g')
-          echo "parentVersion = $REVISION"
-          mvn versions:update-parent -DparentVersion="[$REVISION]"
+          PARENT=$(curl -X GET "https://nexus.incode.work/service/rest/v1/search?sort=version&repository=nightly-builds&group=org.apache.isis.app&name=isis-app-starter-parent" -H "accept: application/json" -s | jq '.items[0].version' | sed 's/"//g')
+          echo "parentVersion = $PARENT"
+          mvn versions:update-parent -DparentVersion="[$PARENT]"
         fi
+        BASELINE=$(cat pom.xml | grep "<version>" | head -1 | awk -F'>' '{print $2}' | awk -F'<' '{print $1}')
+        SHA_ID=$(echo $GITHUB_SHA | cut -c1-8)
+        REVISION=${BASELINE}.$(date +%Y%m%d-%H%M)-${SHA_ID}
+        mvn versions:set -DnewVersion=$REVISION
+
+    - name: Print pom.xml
+      shell: bash
+      run: |
         cat pom.xml
-#        BASELINE=$(cat pom.xml | grep "<version>" | head -1 | awk -F'>' '{print $2}' | awk -F'<' '{print $1}')
-#        SHA_ID=$(echo $GITHUB_SHA | cut -c1-8)
-#        export REVISION=${BASELINE}.$(date +%Y%m%d-%H%M)-${SHA_ID}
-#        mvn versions:set -DnewVersion=$REVISION
 
-#    - name: Print pom.xml
-#      shell: bash
-#      run: |
-#        cat pom.xml
-#
-#    - name: Build with Maven
+    - name: Build with Maven
+      shell: bash
+      run: |
+        mvn install
+
+# uncomment and set environment variables to push to Docker registry
+#    - name: Build and Push Docker Image
 #      shell: bash
 #      run: |
-#        mvn install
-#
-## uncomment and set environment variables to push to Docker registry
-##    - name: Build and Push Docker Image
-##      shell: bash
-##      run: |
-##        export REVISION=...
-##        export DOCKER_REGISTRY_USERNAME
-##        export DOCKER_REGISTRY_PASSWORD
-##        mvn -pl webapp -Ddocker jib:build
+#        export REVISION=...
+#        export DOCKER_REGISTRY_USERNAME
+#        export DOCKER_REGISTRY_PASSWORD
+#        mvn -pl webapp -Ddocker jib:build