-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
40 lines (32 loc) · 1.21 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
# 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 the Pypi repositories in JFrog Artifactory:
# 'ARTIFACTORY_VIRTUAL_REPO', and 'ARTIFACTORY_LOCAL_REPO'.
default:
image: python:bullseye
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-pipenv-build:
script:
- !reference [.setup_jfrog, script]
# Configure JFrog Artifactory repositories
- jf pip-config --repo-resolve $ARTIFACTORY_VIRTUAL_REPO
- jf pipenv-config --repo-resolve $ARTIFACTORY_VIRTUAL_REPO
# Install Pipenv
- jf pip install pipenv
# Resolve dependencies from JFrog Artifactory
- jf pipenv install
# Upload artifact
- jf rt u <path-to-local-file> <ARTIFACTORY_LOCAL_REPO>
# Publish build-info to JFrog Artifactory
- jf rt build-publish
after_script:
# Cleanup
- !reference [.cleanup_jfrog, script]