This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def call(body) { | |
| def rtMaven = '' | |
| def buildInfo = '' | |
| def server = '' | |
| // evaluate the body block, and collect configuration into the object | |
| def pipelineParams= [:] | |
| body.resolveStrategy = Closure.DELEGATE_FIRST | |
| body.delegate = pipelineParams | |
| body() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env groovy | |
| def call(String buildResult) { | |
| if ( buildResult == "SUCCESS" ) { | |
| slackSend color: "good", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was successful" | |
| } | |
| else if( buildResult == "FAILURE" ) { | |
| slackSend color: "danger", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was failed" | |
| } | |
| else if( buildResult == "UNSTABLE" ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| container_name: mysql | |
| volumes: | |
| - mysql-volume:/var/lib/mysql | |
| environment: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: db | |
| MYSQL_USER: blog-user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| host="$1" | |
| shift | |
| cmd="$@" | |
| until mysql -hmysql -p"3306" -u"${database__connection__user}" -p"${database__connection__password}" | |
| -D"${database__connection__database}" ; do | |
| >&2 echo "MySQL is unavailable - sleeping" | |
| sleep 1 | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.1' | |
| volumes: | |
| mysql-volume: | |
| ghost-volume | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| container_name: mysql | |
| volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: jenkins-project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: PersistentVolume | |
| metadata: | |
| name: jenkins-pv | |
| namespace: jenkins-project | |
| spec: | |
| storageClassName: jenkins-pv | |
| accessModes: | |
| - ReadWriteOnce | |
| capacity: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clusterZone: "cluster.local" | |
| master: | |
| componentName: "jenkins-master" | |
| image: "jenkins/jenkins" | |
| tag: "lts" | |
| imagePullPolicy: "Always" | |
| imagePullSecretName: | |
| lifecycle: | |
| numExecutors: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| podTemplate(label: 'mypod', containers: [ | |
| containerTemplate(name: 'git', image: 'alpine/git', ttyEnabled: true, command: 'cat'), | |
| containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', command: 'cat', ttyEnabled: true), | |
| containerTemplate(name: 'docker', image: 'docker', command: 'cat', ttyEnabled: true) | |
| ], | |
| volumes: [ | |
| hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'), | |
| ] | |
| ) { | |
| node('mypod') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env groovy | |
| def call(String buildResult) { | |
| if ( buildResult == "SUCCESS" ) { | |
| slackSend color: "good", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was successful" | |
| } | |
| else if( buildResult == "FAILURE" ) { | |
| slackSend color: "danger", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was failed" | |
| } | |
| else if( buildResult == "UNSTABLE" ) { |
OlderNewer