Rough artifact test

This commit is contained in:
James Seibel
2022-03-15 03:21:44 +00:00
parent 5adfbb2dee
commit 91712cee2a
+9 -46
View File
@@ -3,12 +3,13 @@ image: gradle:eclipse-temurin
# all stages need to be defined here
stages:
- gradleSetup
- build_18-1
- build_18-2
#- gradleSetup
#- build_18-1
#- build_18-2
- artifacts
variables:
# Let's see if setting this to true will improve speed any
# If we have correctness issues when compiling this can be set to false
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
# Pull core when building
GIT_SUBMODULE_STRATEGY: recursive
@@ -22,55 +23,17 @@ before_script:
# This prevents us from re-downloading Gradle every stage
gradleSetup:
stage: gradleSetup
script: ./gradlew --build-cache --gradle-user-home cache/ check
# build using Java 17
image: eclipse-temurin:17
cache:
key:
files:
- gradle/wrapper/gradle-wrapper.properties
policy: push
paths:
- cache/
# 1.18.1 build
build_18-1:
stage: build_18-1
script: ./gradlew build -PmcVer=1.18.1 --gradle-user-home cache/; ./gradlew merge --gradle-user-home cache/
# build using Java 17
image: eclipse-temurin:17
cache:
key: "$CI_COMMIT_REF_NAME_18-1"
policy: pull-push
paths:
- .gradle
- cache/
artifacts:
# This should only be done for the last build, otherwise there will be duplicate jars
name: "Merged_NightlyBuild-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}_18-1"
paths:
# relative to the root directory
- Merged
expire_in: 1 day
# 1.18.2 build
build_18-2:
# put artifacts in a zip
artifacts:
stage: build_18-2
script: ./gradlew build -PmcVer=1.18.2 --gradle-user-home cache/; ./gradlew merge --gradle-user-home cache/
script: echo 'Building complete. Creating artifact Zip.'
# build using Java 17
image: eclipse-temurin:17
cache:
key: "$CI_COMMIT_REF_NAME_18-2"
policy: pull-push
paths:
- .gradle
- cache/
artifacts:
# This should only be done for the last build, otherwise there will be duplicate jars
name: "Merged_NightlyBuild-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}_18-2"
@@ -81,7 +44,7 @@ build_18-2:
## - stage
# unused deployment stage
#deploy:
# stage: deploy
# image: registry.gitlab.com/gitlab-org/release-cli:latest