Skip to content

Commit

Permalink
FAIRSPC-23: test outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreenwood committed Dec 19, 2023
1 parent f0dbf1c commit 8e3d43e
Showing 1 changed file with 5 additions and 37 deletions.
42 changes: 5 additions & 37 deletions .github/workflows/build_on_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,16 @@ on:
pull_request:

jobs:
generate-version: # to have one common unique version for all built artifacts
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.version.outputs.snapshot_version }}
steps:
- name: Check out repository
uses: actions/checkout@v4

- id: version
name: Generating version tag for artifacts
run: |
# EXTRACT VERSION
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "Building images from the branch: $BRANCH"
VER=$(cat ./VERSION)
echo "Building images for version: $VER"
# GET DATE AND TIME FOR VERSIONING
DATE=$(date "+%Y%m%d%H%M%S")
# DOCKER TAG TO BE ATTACHED (SHARED WITHIN OUTPUT):
SNAPSHOT_VERSION=SNAPSHOT-$VER-$DATE
echo "snapshot_version=$SNAPSHOT_VERSION" >> "$GITHUB_OUTPUT"
echo "Docker tag to be attached to images: $SNAPSHOT_VERSION"
build-saturn:
runs-on: ubuntu-latest
needs: generate-version
steps:
- name: Check out repository
uses: actions/checkout@v4

- id: log
name: Log details
- name: Log details
run: |
# VERSION
BRANCH=${{needs.generate-version.outputs.snapshot_version}}
echo "$BRANCH"
# BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
# echo "Triggered on branch: $BRANCH"

BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "Triggered on branch: $BRANCH"
- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -55,7 +24,7 @@ jobs:
distribution: 'temurin'

- name: Build with Gradle
run: ./projects/saturn/gradlew build -p ./projects/saturn/ -x test
run: ./projects/saturn/gradlew build -p ./projects/saturn/


build-pluto:
Expand All @@ -69,7 +38,6 @@ jobs:
run: |
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "Triggered on branch: $BRANCH"
echo "${{needs.build-saturn.outputs.output1}}"
- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -78,7 +46,7 @@ jobs:
distribution: 'temurin'

- name: Build with Gradle
run: ./projects/pluto/gradlew build -p ./projects/pluto/ -x test
run: ./projects/pluto/gradlew build -p ./projects/pluto/


build-mercury:
Expand Down

0 comments on commit 8e3d43e

Please sign in to comment.