Run pipeline on swarm-labeled inbound agent
This commit is contained in:
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@@ -1,5 +1,5 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent { label 'swarm' }
|
||||||
|
|
||||||
options {
|
options {
|
||||||
buildDiscarder(logRotator(numToKeepStr: '20'))
|
buildDiscarder(logRotator(numToKeepStr: '20'))
|
||||||
@@ -14,6 +14,15 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Swarm Agent Check') {
|
||||||
|
steps {
|
||||||
|
sh 'hostname'
|
||||||
|
sh 'id'
|
||||||
|
sh 'docker version --format "{{.Server.Version}}"'
|
||||||
|
sh 'docker service ls --format "{{.Name}} {{.Replicas}}"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Service Reachability') {
|
stage('Service Reachability') {
|
||||||
steps {
|
steps {
|
||||||
sh 'curl -fsS https://gitea.derryle.com/user/login > /dev/null'
|
sh 'curl -fsS https://gitea.derryle.com/user/login > /dev/null'
|
||||||
|
|||||||
Reference in New Issue
Block a user