-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
41 lines (32 loc) · 1.13 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
35
36
37
38
39
40
41
# 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 npm repositories in JFrog Artifactory:
# 'ARTIFACTORY_VIRTUAL_REPO', and 'ARTIFACTORY_LOCAL_REPO'.
default:
image: node:16
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-yarn-build:
script:
- !reference [.setup_jfrog, script]
# Configure JFrog Artifactory repositories
- jf yarnc --repo-resolve npm-virtual
- jf npmc --repo-deploy npm-local
# Use Yarn Berry
- yarn set version berry
# Resolve dependencies from JFrog Artifactory
- jf npm install
# Deploy *.tar.gz to JFrog Artifactory
- jf npm publish
# Publish build-info to JFrog Artifactory
- jf rt build-publish
after_script:
# Cleanup
- !reference [.cleanup_jfrog, script]