Przeglądaj źródła

Running on a node

Spencer Gardner 6 lat temu
rodzic
commit
2312e8ffc4
1 zmienionych plików z 10 dodań i 8 usunięć
  1. 10 8
      Jenkinsfile

+ 10 - 8
Jenkinsfile

@@ -4,17 +4,19 @@ pipeline{
 		pollSCM('H * * * *')
 		cron('H H H * *')
 	}
-	stages{
-        stage('Build') {
-			steps {
-				script {
-					docker.withRegistry('https://docker.snppla.net', 'nexus_push'){
-						def customImage = docker.build("docker.snppla.net/snppla/gogs-docker:${env.GIT_BRANCH}", "--pull ./")
-						customImage.push()
+	node('docker'){
+		stages{
+			stage('Build') {
+				steps {
+					script {
+						docker.withRegistry('https://docker.snppla.net', 'nexus_push'){
+							def customImage = docker.build("docker.snppla.net/snppla/gogs-docker:${env.GIT_BRANCH}", "--pull ./")
+							customImage.push()
+						}
 					}
 				}
 			}
-        }
+		}
 	}
 	post {
 		success{