Jenkins Pipeline (and Docker)

22 views
Skip to first unread message

Max Schindler

unread,
Apr 26, 2017, 6:47:59 AM4/26/17
to Jenkins Users
At this moment i have the following setup

1) `Jenkins` (running in `docker`)
2) A Cloud configured in jenkins, that is configured to use docker. (Including an image which is a docker template). So i can build on `slaves`
3) A `Multipipeline`configured in jenkins
4) When this build runs it automatically starts a slave and runs through the pipeline.

This works fine, but has no use for me. I want to start up all containers that are in my source code (PHP project that needs different containers / services to run). If the `automated tests` succeed, i want jenkins to push everything to my `docker registry`.

This is my pipelinescript so far:

pipeline {

    agent {
        label "build-slave"
    }


    stages {
        stage('Checkout') {

            steps {

                // I want to do some docker stuff here

                echo "hallo Max"
                echo "hier steht jetzt auch was"
                sleep 10
            }
        }

        stage('Setup-Env') {
            steps {
                echo "This is the Setup"
            }
        }
    }
}


I want to do some docker things there. Can someone help me on this?

Reply all
Reply to author
Forward
0 new messages