From cc34d8fb45b29044174ed240bca1e28c5317fcbd Mon Sep 17 00:00:00 2001 From: jas35484 Date: Mon, 17 Jan 2022 19:53:29 -0600 Subject: [PATCH] Add .gitlab-ci.yml --- .gitlab-ci.yml | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ core | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..f61c2ca24 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,65 @@ +# use Eclipse's JDK +image: gradle:eclipse-temurin + +variables: + # Disable the Gradle daemon for Continuous Integration servers as correctness + # is usually a priority over speed in CI environments. Using a fresh + # runtime for each build is more reliable since the runtime is completely + # isolated from any previous builds. + GRADLE_OPTS: "-Dorg.gradle.daemon=false" + # Pull core when building + GIT_SUBMODULE_STRATEGY: recursive + + +before_script: + - echo $CI_JOB_ID + # Writing GE_JOB_ID variable to environment file, will need the value in the next stage. + - echo GE_JOB_ID=$CI_JOB_ID >> generate_jars.env + + +# first stage +build: + stage: build + script: ./gradlew build + # build using Java 8 + image: eclipse-temurin:8 + cache: + key: "$CI_COMMIT_REF_NAME" + policy: push + paths: + - build + - .gradle + - . + artifacts: + paths: + # relative to the root directory + - fabric/build/libs + - forge/build/libs + reports: + # To ensure we've access to this file in the next stage + dotenv: generate_jars.env + + +## second stage +#deploy: +# stage: deploy +# image: registry.gitlab.com/gitlab-org/release-cli:latest +# script: +# - echo 'running release_job' +# - echo 'Previous Job ID is printed below' +# - echo $GE_JOB_ID +# # Specifying that this job requires artifacts from the previous job to succeed +# needs: +# - job: build +# artifacts: true +# release: +# name: 'Unstable Jars for Latest Commit' #: $CI_COMMIT_SHORT_SHA' +# description: 'Created automatically using the release-cli.' +# # tag_name is a mendatory field and can not be an empty string +# tag_name: 'Unstable-$CI_COMMIT_SHORT_SHA' +# assets: +# links: +# - name: 'Fabric Jars' +# url: 'https://gitlab.com/jeseibel/minecraft-lod-mod/cw/-/jobs/${GE_JOB_ID}/artifacts/file/fabric/build/libs' +# - name: 'Forge Jars' +# url: 'https://gitlab.com/jeseibel/minecraft-lod-mod/cw/-/jobs/${GE_JOB_ID}/artifacts/file/forge/build/libs' diff --git a/core b/core index be5b5de17..43304da80 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit be5b5de1705aa35094be9d4361b998ed01d8cd85 +Subproject commit 43304da80b6bc8d86e1d1f1ae35baa760e537b5f