-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
42 lines (42 loc) · 1.1 KB
/
Jenkinsfile
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
pipeline {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: shell
image: node
command:
- sleep
args:
- infinity
'''
defaultContainer 'shell'
}
}
environment {
POSTMAN_ENVIRONMENT_ID = ""
POSTMAN_COLLECTION_ID = "16952209-dbf54a1b-b0c0-4d18-b06f-f59b54831a79"
}
stages {
stage('Install Postman CLI') {
steps {
sh 'curl -o- "https://raw.githubusercontent.com/fyvekatz/portfolio/master/postman_cli_silent.sh" | sh'
}
}
stage('Postman CLI Login') {
steps {
withCredentials([string(credentialsId: 'PM_CONTRACT_TESTS_VIA_GITHUB_API_KEY', variable: 'POSTMAN_API_KEY')]) {
sh 'postman login --with-api-key "${POSTMAN_API_KEY}"'
}
}
}
stage('Running collection') {
steps {
sh 'postman collection run ${POSTMAN_COLLECTION_ID} --integration-id "145246-${JOB_NAME}${BUILD_NUMBER}" --color off'
}
}
}
}