ci: Add Jenkins build+publish pipeline
This commit is contained in:
29
ci/Jenkinsfile
vendored
Normal file
29
ci/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
pipeline {
|
||||
agent {
|
||||
kubernetes {
|
||||
yamlFile 'ci/podTemplate.yaml'
|
||||
yamlMergeStrategy merge()
|
||||
defaultContainer 'build'
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'make'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
environment {
|
||||
PUBLISH_PATH = "/var/www/html/kickstart/${BRANCH_NAME}/"
|
||||
}
|
||||
steps {
|
||||
sshagent(['jenkins-pxe']) {
|
||||
sh 'make publish'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
12
ci/podTemplate.yaml
Normal file
12
ci/podTemplate.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
spec:
|
||||
containers:
|
||||
- name: build
|
||||
image: git.pyrocufflink.net/containerimages/jenkins-common
|
||||
volumeMounts:
|
||||
- mountPath: /etc/ssh/ssh_known_hosts
|
||||
name: ssh-known-hosts
|
||||
subPath: ssh_known_hosts
|
||||
volumes:
|
||||
- name: ssh-known-hosts
|
||||
configMap:
|
||||
name: ssh-known-hosts
|
||||
Reference in New Issue
Block a user