diff --git a/Jenkinsfile b/Jenkinsfile index 5d1bce9..574ec0b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent any + agent { label 'swarm' } options { 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') { steps { sh 'curl -fsS https://gitea.derryle.com/user/login > /dev/null'