-
Notifications
You must be signed in to change notification settings - Fork 160
/
Copy pathpipelines.snapshot.yml
63 lines (55 loc) · 2.31 KB
/
pipelines.snapshot.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
pipelines:
# Global configuration
- name: create_build_info_snapshot
configuration:
runtime:
type: image
image:
auto:
language: java
versions:
- "8"
steps:
- name: Snapshot
type: Bash
configuration:
inputResources:
- name: biSnapshotGit
integrations:
- name: ecosys_entplus_deployer
execution:
onStart:
# Save gradle cache
- restore_cache_files gradle_cache $res_biSnapshotGit_resourcePath/.gradle
onExecute:
- cd $res_biSnapshotGit_resourcePath
# Set env
- export CI=true
- export JFROG_BUILD_STATUS=PASS
- export JFROG_CLI_BUILD_NAME=ecosystem-build-info-dev
- export JFROG_CLI_BUILD_NUMBER=$run_number
- export JFROG_CLI_BUILD_PROJECT=ecosys
# Configure JFrog CLI
- curl -fL https://install-cli.jfrog.io | sh
- jf c rm --quiet
- jf c add internal --url=$int_ecosys_entplus_deployer_url --user=$int_ecosys_entplus_deployer_user --password=$int_ecosys_entplus_deployer_apikey
- jf gradlec --use-wrapper --uses-plugin --repo-resolve ecosys-maven-remote --repo-deploy ecosys-oss-snapshot-local
# Run audit
- jf audit --fail=false
# Delete former snapshots to make sure the release bundle will not contain the same artifacts
- jf rt del "ecosys-oss-snapshot-local/org/jfrog/buildinfo/*" --quiet
# Run install and publish
- >
env -i PATH=$PATH HOME=$HOME
JFROG_CLI_BUILD_NAME=$JFROG_CLI_BUILD_NAME
JFROG_CLI_BUILD_NUMBER=$JFROG_CLI_BUILD_NUMBER
JFROG_CLI_BUILD_PROJECT=$JFROG_CLI_BUILD_PROJECT
jf gradle clean aP -x test
- jf rt bag && jf rt bce
- jf rt bp
# Distribute release bundle
- jf ds rbc ecosystem-build-info-snapshot $run_number --spec=./release/specs/dev-rbc-filespec.json --sign
- jf ds rbd ecosystem-build-info-snapshot $run_number --site="releases.jfrog.io" --sync
onComplete:
# Save gradle cache
- add_cache_files $res_biSnapshotGit_resourcePath/.gradle gradle_cache