-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathJenkinsfile.disable
39 lines (34 loc) · 1.06 KB
/
Jenkinsfile.disable
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
pipeline {
// triggers { pollSCM('H/3 * * * *') }
agent {
kubernetes {
label 'projects-s3zipper-worker'
defaultContainer 'gitops'
yamlFile '.jenkins/KubernetesPod.yaml'
}
}
stages {
stage('Build docker image') {
when {
not {
changeRequest()
}
anyOf {
branch 'master'
}
}
steps {
container('gitops') {
withCredentials([usernamePassword( credentialsId: 'jenkins-projects-dockerhub-creds', usernameVariable: 'DOCKER_USR', passwordVariable: 'DOCKER_PSW')]) {
sh 'docker login --username ${DOCKER_USR} --password ${DOCKER_PSW}'
//sh 'docker build -t teamwork/project-manager:$(git rev-parse HEAD) ./'
sh 'make build push'
}
withCredentials([usernamePassword( credentialsId: 'jenkins-projects-github-creds', usernameVariable: 'GITHUB_USR', passwordVariable: 'GITHUB_PSW')]) {
sh 'make git-prep git-push GH_TOKEN=$GITHUB_PSW BRANCH=$BRANCH_NAME'
}
}
}
}
}
}