mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 02:59:19 +01:00
Update .gitlab-ci.yml
This commit is contained in:
parent
5efa42043f
commit
1787ac603c
@ -1,28 +1,45 @@
|
|||||||
image: sbtscala/scala-sbt:eclipse-temurin-jammy-8u352-b08_1.8.3_2.13.10
|
default:
|
||||||
|
image: sbtscala/scala-sbt:eclipse-temurin-jammy-8u352-b08_1.8.3_2.13.10
|
||||||
|
|
||||||
variables:
|
cache:
|
||||||
GIT_SUBMODULE_STRATEGY: normal
|
|
||||||
SBT_OPTS: "-Dsbt.global.base=sbt-cache/.sbtboot -Dsbt.boot.directory=sbt-cache/.boot -Dsbt.ivy.home=sbt-cache/.ivy"
|
|
||||||
SBT_CACHE_DIR: "sbt-cache/.ivy/cache"
|
|
||||||
|
|
||||||
cache:
|
|
||||||
key: "$CI_COMMIT_REF_SLUG"
|
key: "$CI_COMMIT_REF_SLUG"
|
||||||
paths:
|
paths:
|
||||||
- "sbt-cache"
|
- "sbt-cache"
|
||||||
- "target/streams"
|
- "target/streams"
|
||||||
- "lib/ocelot-brain/target"
|
- "lib/ocelot-brain/target"
|
||||||
|
|
||||||
before_script:
|
variables:
|
||||||
- sbt -v sbtVersion
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
|
SBT_OPTS: "-Dsbt.global.base=sbt-cache/.sbtboot -Dsbt.boot.directory=sbt-cache/.boot -Dsbt.ivy.home=sbt-cache/.ivy"
|
||||||
|
SBT_CACHE_DIR: "sbt-cache/.ivy/cache"
|
||||||
|
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ocelot-desktop/${CI_COMMIT_TAG}"
|
||||||
|
PACKAGE_NAME: "ocelot-desktop-${CI_COMMIT_TAG}.jar"
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- upload
|
||||||
|
- deploy
|
||||||
|
- release
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- sbt -v sbtVersion
|
||||||
script:
|
script:
|
||||||
- sbt assembly
|
- sbt assembly
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/scala-2.13/ocelot-desktop.jar
|
- target/scala-2.13/ocelot-desktop.jar
|
||||||
|
|
||||||
|
upload:
|
||||||
|
stage: upload
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
curl --fail-with-body --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file target/scala-2.13/ocelot-desktop.jar "${PACKAGE_REGISTRY_URL}/${PACKAGE_NAME}"
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
before_script: []
|
before_script: []
|
||||||
@ -36,3 +53,17 @@ pages:
|
|||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
|
||||||
|
release:
|
||||||
|
stage: release
|
||||||
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- echo "Creating a new release for tag $CI_COMMIT_TAG."
|
||||||
|
- |
|
||||||
|
release-cli create \
|
||||||
|
--name "Release $CI_COMMIT_TAG" \
|
||||||
|
--tag-name "$CI_COMMIT_TAG" \
|
||||||
|
--description "$CI_COMMIT_TAG_MESSAGE" \
|
||||||
|
--assets-link "{\"name\":\"${PACKAGE_NAME}\",\"link_type\":\"package\",\"url\":\"${PACKAGE_REGISTRY_URL}/${PACKAGE_NAME}\"}"
|
||||||
Loading…
x
Reference in New Issue
Block a user