all.
Im using docker cloud plugin in my jenkins platform.
https://plugins.jenkins.io/docker-plugin/
But i wonder where can i find the workspace within this agent.
My some builds failing and putting logs file inside container. I couldnt find these files.
Do you know where to search workpace ? In docker host itself ?
You can find it on the host, which was configured to run containers in Configure Clouds menu.
But it is not configured in my example.
Related
Can you pass a binary from a Jenkins host to an agent?
I've got Jenkins running in Kubernetes, and the terraform plugin installed on my Jenkins master with the binary located at /var/jenkins_home/tools/org.jenkinsci.plugins.terraform.TerraformInstallation/terraform/terraform
I would like to pass this to my Jenkins agent by configuring my pod template and mounting the host volume path /var/jenkins_home/tools/org.jenkinsci.plugins.terraform.TerraformInstallation/terraform/terraform to the agent's path /usr/bin/terraform
But this doesn't seem to work as expected
When I exec into the agent and run a terraform version I get the error bash: terraform: command not found indicating that it doesn't have the binary.
I can see a terraform directory mounted in /usr/bin but without the binary. What I expect is for terraform to be installed on the agent. But my thinking might be incorrect here.
Is it possible to do this, has anyone has any experience with this?
As a #David Maze mentioned binary from Jenkins needs to be manually installed on every node, which can be a difficult to manage. However you can set Jenkins to run pipeline steps inside a container where the image contains the tools you need, which simplifies such case.
Read more: execution-env-jenkins.
One alternative is to use the slaves setup plugin. We use it to install and configure internal tools (and end) on nodes bases on labels. A log less hassle than #Malgorata's (and our previous) manually copy approach
Not sure how well it works with Kubernetes as not in our configuration.
I am not able to integrate Docker with Jenkins completely. I setup Docker at Cloud Node settings in the Jenkins portal. How can I use some image that contains Node, Ruby, etc? Must those images contain a JDK?
There is a great post with a detailed explanation of how to deal with this here. In the post, they state that every Docker image (even if you require building a Node or Ruby project) requires a JDK. Seems the JDK requirement comes from the Docker plugin.
How to automate Jenkins for Docker Swarm deployment.
I am wondering if there are any plugins available in Jenkins which will help in Docker Swarm deployment or any other alternative way through which we can achieve the automation of Swarm deployment using Jenkins existing plugins?
Fixed this problem by using a plugin called Publish over SSH
Need to install a Jenkins plugins “Publish over SSH”, this plugin will allows us to
Sends files over SSH(SFTP)
Execute commands on a remote server
First step will be to add remote hosts and second will be to add an execution/build step where the commands will be executed
Follow this link for step by step instruction
I have one jenkins server. There I cannot install docker. So the question is what is the correct way of integrating jenkins with a docker server? Whats the fastest easiest and most convenient way to integrate it?
1.Through a jenkins node with docker installed there
2.Through ssh? And if - how would the configuration look?
3.Only through installed docker on the main jenkins server
4.Other?
that depends on the version of Docker engine you are about to install and the jobs you want to sue it for ( pipeline , freestyle )
basically if your docker engine is no greater then version 1.11 the best way is to use Docker Plugin from Jenkins if you want to simulate containers as slaves.
you can also use workflow docker plugin and even ssh as you said.
it all depends on what you want to achieve from your docker usage
I see no problem with dockerizing Jenkins master (there is even an image ready to use) however I would like to dockerize also slaves. However I'd like these slaves to run iOS builds, so it neeeds slaves to run OS X. Is it doable? Maybe Vagrant, Puppet, Chef anything else could help to automate slaves provisioning?
So you can't use Docker on iOS so you'll need something else there but otherwise this kind of thing is usually handled via Jenkins plugins instead of an external configuration management tool. Jenkins likes to controls its own universe.
There is a Docker Plugin which allows you to deploy dockerized slaves. Follow the documentation, it is pretty simple (no chef/puppet needed)
The problem is that I am not sure that it is possible to have XCode inside the docker container.
Try docker search OSX and docker search Xcode for the image in the Docker Hub.