diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..5eef75c --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,25 @@ +def label = "docker-${UUID.randomUUID().toString()}" + +podTemplate(label: label, inheritFrom: 'base') { + node(label) { + stage('Checkout Repository') { + container('base') { + checkout scm + } + } + + stage('Login to Dockerhub') { + withCredentials([usernamePassword(credentialsId: 'DockerHubAccessYardstick', usernameVariable: 'USER', passwordVariable: 'PASS')]) { + container('base') { + sh "docker login --username ${USER} --password ${PASS}" + } + } + } + + stage('Build Docker image') { + container('base') { + sh "make display full branch=${BRANCH_NAME}" + } + } + } +} \ No newline at end of file