forked from DBCG/cql_execution_service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
47 lines (45 loc) · 1.37 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
43
44
45
46
47
#!/usr/bin/env groovy
pipeline{
agent any
environment {
GTRI_IMAGE_REGISTRY = credentials('gtri-image-registry')
GTRI_RANCHER_API_ENDPOINT = credentials('gtri-rancher-api-endpoint')
GTRI_HDAP_ENV_ID = credentials('hdap-aws-rancher-env')
CLARITYNLP_DOCKERHUB_CREDS = 'claritynlp-dockerhub'
paasImage = ''
}
stages{
stage('Building image') {
steps{
script {
paasImage = docker.build("claritynlp/cqlexecutionservice:1.0", ".")
}
}
}
stage('Push image to private registry'){
steps{
script{
docker.withRegistry("https://${GTRI_IMAGE_REGISTRY}"){
paasImage.push("latest")
}
}
}
}
stage('Push image to public registry'){
steps{
script{
docker.withRegistry('', CLARITYNLP_DOCKERHUB_CREDS){
paasImage.push("latest")
}
}
}
}
stage('Notify orchestrator'){
steps{
script{
rancher confirm: true, credentialId: 'gt-rancher-server', endpoint: "${GTRI_RANCHER_API_ENDPOINT}", environmentId: "${GTRI_HDAP_ENV_ID}", environments: '', image: "${GTRI_IMAGE_REGISTRY}/claritynlp/cqlexecutionservice:latest", ports: '', service: 'CQL-Execution/cql-execution', timeout: 600
}
}
}
}
}