-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathNpm-Pipelines.yaml
112 lines (100 loc) · 3.34 KB
/
Npm-Pipelines.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
pipelines:
- name: npm_build
# Global configuration section for the entire pipeline
configuration:
environmentVariables:
readOnly:
Version: 1.0.$run_number
dockerImage: 34.107.212.223/team1-docker/npm-app
steps:
- name: npm_compile
type: NpmBuild
configuration:
runtime:
type: image
image:
custom:
name: docker.bintray.io/jfrog/pipelines-u18node
tag: "10.16.3"
npmArgs: install
repositoryName: team1-npm
sourceLocation: tutorial/step2-create-ui-pkg
integrations:
- name: artifactory
inputResources:
- name: orbitera_gitRepo_demo
execution:
onStart:
- npm install shelljs
- name: npm_publish
type: NpmPublish
configuration:
repositoryName: team1-npm
forceXrayScan: false
autoPublishBuildInfo: true
integrations:
- name: artifactory
inputSteps:
- name: npm_compile
outputResources:
- name: npmBuildInfo
- name: npm_scan
type: XrayScan
configuration:
#inherits from bash
waitUntilFinish: true
inputResources:
- name: npmBuildInfo
trigger: true
outputResources:
- name: scanned_npmBuild_Info
- name: npm_promote
type: PromoteBuild
configuration:
targetRepository: team1-npm-staging-us
includeDependencies: false
status: Passed
comment: Artifact passed Xray Scan
copy: true
inputResources:
- name: scanned_npmBuild_Info # optional
trigger: true
outputResources:
- name: promoted_npmBuild_Info
- name: npm_docker_build
type: DockerBuild
configuration:
dockerFileLocation: tutorial/step3-create-docker-multi-app
dockerFileName: Dockerfile
# dockerImageName: ${dockerImage}
dockerImageName: ${ArtIP}/team1-docker/npm-app
dockerImageTag: ${Version}
inputResources:
- name: orbitera_gitRepo_demo
- name: npm_fileSpec
- name: promoted_npmBuild_Info
trigger: true
integrations:
- name: artifactory
execution:
onStart:
- export ArtIP=$(echo ${int_artifactory_url}|awk -F '/' '{print $3}'|awk -F ':' '{print $1}')
- mkdir -p tutorial/step3-create-docker-multi-app/package
onSuccess:
- echo "Congrats The Docker image was build"
onFailure:
- echo "uh oh, something went wrong"
onComplete: #always
- echo "Cleaning up some stuff"
- name: Npm_docker_push
type: DockerPush
configuration:
targetRepository: team1-docker
forceXrayScan: false
autoPublishBuildInfo: true
integrations:
- name: artifactory
inputSteps:
- name: npm_docker_build
outputResources:
- name: docker_npmBuild_Info