-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
34 lines (27 loc) · 1.11 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This template does the following:
#
# 1. Builds the project while resolving the dependencies from Artifactory
# 2. Uploads the build artifact to Artifactory
# 3. Publishes the build-info to Artifactory
#
# Requirements:
# Configure the following variables with the names of Gradle repositories in JFrog Artifactory:
# 'ARTIFACTORY_VIRTUAL_REPO', and 'ARTIFACTORY_LOCAL_REPO'.
default:
image: eclipse-temurin:11
include:
- remote: "https://releases.jfrog.io/artifactory/jfrog-cli/gitlab/v2/.setup-jfrog-unix.yml"
# For Windows agents:
#- remote: "https://releases.jfrog.io/artifactory/jfrog-cli/gitlab/v2/.setup-jfrog-windows.yml"
jfrog-gradle-build:
script:
- !reference [.setup_jfrog, script]
# Configure JFrog Artifactory repositories
- jf gradle-config --repo-resolve $ARTIFACTORY_VIRTUAL_REPO --repo-deploy $ARTIFACTORY_LOCAL_REPO --use-wrapper
# Build Gradle project and upload the artifacts to JFrog Artifactory
- jf gradle clean artifactoryPublish
# Publish build-info to JFrog Artifactory
- jf rt build-publish
after_script:
# Cleanup
- !reference [.cleanup_jfrog, script]