diff --git a/Jenkinsfile b/Jenkinsfile index b58ef8da69ce78a734c9ff240a0bdca1806a7b07..9ba1ddace7235c2c8eb3efa3ab9eedc07d45ef6c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,12 +1,4 @@ -pipeline { - agent { - kubernetes { - label 'jenkins-jenkins-slave' - defaultContainer 'jnlp' - } - } -} - { +node { def app stage('Clone repository'){ checkout scm @@ -26,9 +18,14 @@ pipeline { docker.withRegistry('','docker-hub-credentials'){ app.push("latest") } - } + } + - stage ('Deploy') { - sh 'echo kubectl get nodes' - } -} + stage('Deploy') { + kubernetes { + steps { + sh 'echo kubectl get nodes' + } + } + } +} \ No newline at end of file