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 2022/03/14 18:02:05 UTC
[isis] branch ISIS-2975 created (now cf522ba)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch ISIS-2975
in repository https://gitbox.apache.org/repos/asf/isis.git.
at cf522ba ISIS-2975: experiments
This branch includes the following new commits:
new cf522ba ISIS-2975: experiments
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[isis] 01/01: ISIS-2975: experiments
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2975
in repository https://gitbox.apache.org/repos/asf/isis.git
commit cf522ba910197cdd6267fef4b7127b2a36002863
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Mar 14 18:01:50 2022 +0000
ISIS-2975: experiments
---
.../workflows/ci-build-artifacts-no-push-maven.yml | 35 +++---
.../workflows/ci-build-artifacts-push-maven.yml | 129 +++++++++++++++++++++
isis-parent/pom.xml | 5 +
scripts/ci/calc_revision.sh | 14 +++
4 files changed, 165 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/ci-build-artifacts-no-push-maven.yml b/.github/workflows/ci-build-artifacts-no-push-maven.yml
index 5ced4ee..8d2485c 100644
--- a/.github/workflows/ci-build-artifacts-no-push-maven.yml
+++ b/.github/workflows/ci-build-artifacts-no-push-maven.yml
@@ -1,4 +1,4 @@
-name: Build and Test (w/ Maven)
+name: Build, Test (Java 17)
on:
push:
@@ -14,36 +14,36 @@ jobs:
runs-on: ubuntu-latest
env:
# to be shared among all steps of this job
- BASELINE: 2.0.0-M6
+ BASELINE: 2.0.0-M7
PROJECT_ROOT_PATH: ${{ github.workspace }}
CI_SCRIPTS_PATH: ${{ github.workspace }}/scripts/ci
-
- # not used, would be nice if we could transform the TIMESTAMP string into the REVISION
- # variable here, but it seems github not yet has any string expression manipulation
- # operators other than concatination
+
+ # not used, would be nice if we could transform the TIMESTAMP string into the REVISION
+ # variable here, but it seems github not yet has any string expression manipulation
+ # operators other than concatination
TIMESTAMP: ${{ github.event.head_commit.timestamp }}
-
+
# set this to 'deploy' when intent is to push the built packages to a repo
- # requires 'secrets' which we don't have yet
+ # requires 'secrets' which we don't have yet
MVN_STAGES: install
steps:
- uses: actions/checkout@v3
-
+
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
-
+
- name: Print Maven Version
run: mvn --version
-
+
- name: Activate Cache for Maven Downloads
uses: actions/cache@v2.1.7
env:
# change the cache-name if we want to rebuild the cache
- # currently there is no concept of cache clearing
+ # currently there is no concept of cache clearing
cache-name: maven-2021-08
with:
path: ~/.m2/repository
@@ -51,7 +51,7 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-
-
+
- name: Setup Script Environment
shell: bash
run: |
@@ -62,7 +62,7 @@ jobs:
echo CI_SCRIPTS_PATH \: $CI_SCRIPTS_PATH
echo MVN_STAGES \: $MVN_STAGES
echo ======================================
-
+
- name: Build Artifacts
shell: bash
run: bash $CI_SCRIPTS_PATH/build-artifacts.sh
@@ -82,11 +82,11 @@ jobs:
-T 1C
# FOR DEBUG USE
-# - name: Dump GitHub context
+# - name: Dump GitHub context
# env:
# ENV_CONTEXT: ${{ toJson(env) }}
# run: echo "$ENV_CONTEXT"
-# - name: Dump GitHub context
+# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
@@ -110,5 +110,4 @@ jobs:
# env:
# MATRIX_CONTEXT: ${{ toJson(matrix) }}
# run: echo "$MATRIX_CONTEXT"
-
-
\ No newline at end of file
+
diff --git a/.github/workflows/ci-build-artifacts-push-maven.yml b/.github/workflows/ci-build-artifacts-push-maven.yml
new file mode 100644
index 0000000..916897c
--- /dev/null
+++ b/.github/workflows/ci-build-artifacts-push-maven.yml
@@ -0,0 +1,129 @@
+name: Build, Test, Push (Java 11)
+
+on:
+ push:
+ branches:
+ - ISIS-2975
+ pull_request:
+ branches:
+ - ISIS-2975
+
+jobs:
+ build:
+ name: build-local-no-push
+ runs-on: ubuntu-latest
+ env:
+ # to be shared among all steps of this job
+ BASELINE: 2.0.0-M7
+ PROJECT_ROOT_PATH: ${{ github.workspace }}
+ CI_SCRIPTS_PATH: ${{ github.workspace }}/scripts/ci
+
+ # not used, would be nice if we could transform the TIMESTAMP string into the REVISION
+ # variable here, but it seems github not yet has any string expression manipulation
+ # operators other than concatenation
+ TIMESTAMP: ${{ github.event.head_commit.timestamp }}
+
+ # set this to 'deploy' when intent is to push the built packages to a repo
+ # requires 'secrets' which we don't have yet
+ MVN_STAGES: deploy
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'zulu'
+ java-version: 11
+
+ - name: Print Maven Version
+ run: mvn --version
+
+ - name: Activate Cache for Maven Downloads
+ uses: actions/cache@v2.1.7
+ env:
+ # change the cache-name if we want to rebuild the cache
+ # currently there is no concept of cache clearing
+ cache-name: maven-2021-08
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ env.cache-name }}-
+ ${{ runner.os }}-
+
+ - name: Calculate new $REVISION (if changed since last published, else skip)
+ id: revision
+ shell: bash
+ run: bash scripts/ci/calc-revision.sh
+
+ - name: Share $REVISION as Environment Variable
+ run: echo "REVISION=${{ steps.revision.outputs.revision }}" >> $GITHUB_ENV
+
+ - name: Setup Script Environment
+ shell: bash
+ run: |
+ echo ============== ENV =================
+ echo BASELINE \: $BASELINE
+ echo TIMESTAMP \: $TIMESTAMP
+ echo PROJECT_ROOT_PATH\: $PROJECT_ROOT_PATH
+ echo CI_SCRIPTS_PATH \: $CI_SCRIPTS_PATH
+ echo REVISION \: $REVISION
+ echo ======================================
+
+# - name: Create GitHub Release
+# uses: actions/create-release@v1
+# env:
+# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+# with:
+# tag_name: ${{ env.REVISION }}
+# release_name: Release ${{ env.REVISION }}
+#
+# - name: Build Artifacts
+# shell: bash
+# run: bash scripts/ci/build-artifacts.sh
+# env:
+# # -Dreleased ... build only the released modules
+# # -Denforcer.failFast=true ... fail fast on convergence issues (enforcer plugin)
+# # -Dmaven.source.skip=true ... no need for the CI build to pull sources
+# # -Djacoco.skip=true ... no need for the CI build to add test coverage reports
+# # -T 1C ... 1 build thread per core
+# MVN_ADDITIONAL_OPTS: >-
+# -Dmodule-essential
+# -Dproject.build.outputTimestamp=1
+# -Denforcer.failFast=true
+# -Djacoco.skip=true
+# -DskipTests
+# -T 1C
+# GITHUB_TOKEN: ${{ github.token }}
+
+# FOR DEBUG USE
+# - name: Dump GitHub context
+# env:
+# ENV_CONTEXT: ${{ toJson(env) }}
+# run: echo "$ENV_CONTEXT"
+# - name: Dump GitHub context
+# env:
+# GITHUB_CONTEXT: ${{ toJson(github) }}
+# run: echo "$GITHUB_CONTEXT"
+# - name: Dump job context
+# env:
+# JOB_CONTEXT: ${{ toJson(job) }}
+# run: echo "$JOB_CONTEXT"
+# - name: Dump steps context
+# env:
+# STEPS_CONTEXT: ${{ toJson(steps) }}
+# run: echo "$STEPS_CONTEXT"
+# - name: Dump runner context
+# env:
+# RUNNER_CONTEXT: ${{ toJson(runner) }}
+# run: echo "$RUNNER_CONTEXT"
+# - name: Dump strategy context
+# env:
+# STRATEGY_CONTEXT: ${{ toJson(strategy) }}
+# run: echo "$STRATEGY_CONTEXT"
+# - name: Dump matrix context
+# env:
+# MATRIX_CONTEXT: ${{ toJson(matrix) }}
+# run: echo "$MATRIX_CONTEXT"
+
diff --git a/isis-parent/pom.xml b/isis-parent/pom.xml
index d016fbe..10eafba 100644
--- a/isis-parent/pom.xml
+++ b/isis-parent/pom.xml
@@ -311,6 +311,11 @@ under the License.
<name>${distMgmtSnapshotsName}</name>
<url>${distMgmtSnapshotsUrl}</url>
</snapshotRepository>
+ <repository>
+ <id>github</id>
+ <name>Github Releases</name>
+ <url>https://maven.pkg.github.com/apache/isis</url>
+ </repository>
</distributionManagement>
<properties>
diff --git a/scripts/ci/calc_revision.sh b/scripts/ci/calc_revision.sh
new file mode 100644
index 0000000..12db771
--- /dev/null
+++ b/scripts/ci/calc_revision.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+echo ""
+echo ""
+echo ""
+
+DATE=$(date +%Y%m%d.%H%M)
+BRANCH=$(echo $GITHUB_REF_NAME)
+
+GIT_SHORT_COMMIT=$(echo $GITHUB_SHA | cut -c1-8)
+
+REVISION=$BASELINE.$DATE.$BRANCH.$GIT_SHORT_COMMIT
+
+echo "##[set-output name=revision;]${REVISION}"