Trying to get a docker image running with Jenkins pipelines for a couple of days now. I started out with Blue Ocean, but learned that this no longer works since the username/password stuff changed in github and bitbucket. My next approach was to ditch Blue Ocean all together, and just take the simplest example of Jenkins pipeline.
I created my jenkins job as follows:
- new item in dashboard → pipeline → OK
- pipeline definition => pipeline script from SCM
- SCM = git
- filled in my github branch
- created credentials with username (NOT email address) and Personal Access Token (Full rights)
- pointed to Jenkinsfile, which lives in the root of my main branch.
My initial Jenkinsfile works. It does nothing but echo something. Works fine.
Then the only change I made is change the Jenkinsfile to use a docker file:
agent { dockerfile true }
checked that in, and build again. Now it gives me the following error
The full Jenkinsfile for completeness:
pipeline {
agent { dockerfile true }
stages {
stage('Test') {
steps {
echo 'bla'
}
}
}
}
and the Dockerfile (although, it doesn’t even get that far, but just for reference)
FROM ubuntu
The both are in the root of my repository. Changing the line from
agent any
to
agent { dockerfile true }
causes the error:
Error response from daemon: Client sent an HTTP request to an HTTPS server.
I googled it, but I am getting nowhere. Can anybody help me getting further?
