forked from homebridge/docker-homebridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
39 lines (39 loc) · 1.15 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
pipeline {
environment {
registry = 'harbor-core.az.tillman.wtf/tillmanwtf/homebridge'
registryCredential = 'harbor-core.az.tillman.wtf'
dockerImage = ''
}
agent {
kubernetes {
yamlFile 'KubernetesBuildPod.yaml'
}
}
stages {
stage('Git Clone') {
steps {
checkout scmGit(branches: [[name: '*/latest']], userRemoteConfigs: [[credentialsId: 'github-briantillman', url: 'git@github.com:BrianTillman/docker-homebridge.git']])
}
}
stage('Build Container Image') {
steps {
container('docker') {
script {
dockerImage = docker.build registry + ":$BUILD_NUMBER"
}
}
}
}
stage('Publish Container Image') {
steps {
container('docker') {
script {
docker.withRegistry( "https://" + registry, registryCredential) {
dockerImage.push()
}
}
}
}
}
}
}