1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/linuxsuren-kubernetes-plugin

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Jenkinsfile-kubernetes 1.6 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Vincent Latombe Отправлено 10.07.2019 15:24 51389eb
/**
* Build and test the kubernetes plugin using the plugin itself in a Kubernetes cluster
*
* A `jenkins` service account needs to be created using src/main/kubernetes/service-account.yml
*
* A PersistentVolumeClaim needs to be created ahead of time with the definition in examples/maven-with-cache-pvc.yml
*
* NOTE that typically writable volumes can only be attached to one Pod at a time, so you can't execute
* two concurrent jobs with this pipeline. Or change readOnly: true after the first run
*/
podTemplate(yaml: """
apiVersion: v1
kind: Pod
spec:
serviceAccountName: jenkins
containers:
- name: maven
command:
- cat
tty: true
env:
- name: BUILD_NUMBER
value: ${env.BUILD_NUMBER}
- name: BRANCH_NAME
value: ${env.BRANCH_NAME}
- name: _JAVA_OPTIONS
value: -Xmx300M
image: maven:3.6.1-jdk-8
resources:
limits:
memory: 1500Mi
requests:
cpu: 100m
memory: 1500Mi
""") {
node(POD_LABEL) {
stage('Checkout') {
checkout scm
}
stage('Package') {
try {
container('maven') {
sh 'mvn -B -ntp clean install -Dmaven.test.skip=true'
}
} finally {
archiveArtifacts allowEmptyArchive: true, artifacts: '**/target/*.hpi,**/target/*.jpi'
findbugs(includePattern:'**/target/findbugsXml.xml')
}
}
stage('Test') {
try {
container('maven') {
sh 'mvn -B -ntp test -DconnectorHost=0.0.0.0'
}
} finally {
junit '**/target/surefire-reports/**/*.xml'
}
}
}
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/linuxsuren-kubernetes-plugin.git
git@api.gitlife.ru:oschina-mirror/linuxsuren-kubernetes-plugin.git
oschina-mirror
linuxsuren-kubernetes-plugin
linuxsuren-kubernetes-plugin
master