Jenkinsfile_1 815 Bytes
Newer Older
Spiros Koulouzis's avatar
Spiros Koulouzis committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
node {
    def app

    stage('Clone repository') {
        git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git'
    }
}

node('docker') {

    stage('Clone repository on slave') {
        git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git'
    }

    stage('Build image') {
        /* This builds the actual image; synonymous to
         * docker build on the command line */
        sh "cd sure_tosca-flask-server"
        app = docker.build("sure-tosca/alogo53")
    }

    stage('Test image') {
        app.inside {
            sh 'echo "Tests passed"'
        }
    }

    stage('Push image') {
        //docker.withRegistry('https://registry.hub.docker.com', 'docker-hub') {
        //    app.push("${env.BUILD_NUMBER}")
        //    app.push("latest")
        //}
    }
}