Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update relase workflow to accept artifact version #3080

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Release

on:
push:
branches:
- 'main'
workflow_dispatch:
inputs:
artifact_version:
description: 'Target version for artifacts to build and publish'
required: true

jobs:
gradle:
Expand All @@ -19,4 +21,5 @@ jobs:
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
artifacts_version: "${{ inputs.artifact_version }}"
gradle_args: "-PreleaseBuild=true"
6 changes: 5 additions & 1 deletion actions/gradle-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Gradle Test

inputs:
artifact_version:
description: 'Version of final artifacts to build'
required: false
default: ''
fdb_version:
description: 'Version of FDB to run'
required: false
Expand Down Expand Up @@ -42,7 +46,7 @@ runs:
run: sed -i -e "s/^org\.gradle\..*/#&/g" gradle.properties
- name: Run build and test
shell: bash
run: GRADLE_OPTS="-XX:+HeapDumpOnOutOfMemoryError -Xverify:none -XX:+TieredCompilation -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED" ./gradlew --no-daemon --console=plain -b ./build.gradle build destructiveTest -PcoreNotStrict ${{ inputs.gradle_args }}
run: ARTIFACT_VERSION="${{ inputs.artifact_version }}" GRADLE_OPTS="-XX:+HeapDumpOnOutOfMemoryError -Xverify:none -XX:+TieredCompilation -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED" ./gradlew --no-daemon --console=plain -b ./build.gradle build destructiveTest -PcoreNotStrict ${{ inputs.gradle_args }}
- name: Copy Test Reports
shell: bash
if: always()
Expand Down
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ allprojects {
}

repositories {
if (System.getenv("ARTIFACT_VERSION") != null) {
version = "${System.getenv('ARTIFACT_VERSION')}"
} else if (System.getenv("RECORD_LAYER_BUILD_NUMBER") != null) {
version = "${version}.${System.getenv('RECORD_LAYER_BUILD_NUMBER')}"
var artifactVersion = System.getenv("ARTIFACT_VERSION")
var buildNumber = System.getenv("RECORD_LAYER_BUILD_NUMBER")
if (artifactVersion != null && !artifactVersion.isEmpty()) {
version = artifactVersion
} else if (buildNumber != null && !buildNumber.isEmpty()) {
version = "${version}.${buildNumber}"
}
if (Boolean.parseBoolean(mavenLocalEnabled)) {
mavenLocal()
Expand Down
Loading