wierdbeard65 Posted May 1, 2018 Share Posted May 1, 2018 Ok, I think I follow! I wasn't aware that I could have 2 slaves in one Jenkins job, so I will look into this. I wholeheartedly agree that if I could do it all with Docker, I should, but unless something has changed, I don't believe I can. I am developing .Net applications which need the Windoze OS to compile and test, I believe? Incidentally, I am not wanting to create or delete the VM (which would, as you say, be slow), only start it up and shut it down. I don't want it to be left running 24x7, just fired up to do a build and then shut down again afterwards. Thank you once again for your support. Quote Link to comment
phyzical Posted January 28, 2020 Share Posted January 28, 2020 (edited) Hey there! Love the apps. This is my first time setting up a jenkins server and this is more of a general jenkins question so feel free to say sorry cant help but after a couple of days of googling and trying various things im just at a loss so i thought i would try here also, Im trying to add an ssh key via the credentials plugin, to checkout my private github repos for testing and ci deployments but no matter what i try it seems to think my private key is invalid. You wouldnt happen to know where the hell i enter the public key for a private key? as the plugin wants a username not the public key (i also tried my username for github juust incase). Ive seen many mentions of using an ssh agent but that just seem a weird way to go about it. Thanks in advance! edit: infact re-reading the responses in this thread am i actually supposed to have say a ubuntu vm running and use that as an agent rather than relying on the docker image as the agent? Edited January 28, 2020 by phyzical Quote Link to comment
binhex Posted January 28, 2020 Author Share Posted January 28, 2020 1 hour ago, phyzical said: Im trying to add an ssh key via the credentials plugin, to checkout my private github repos for testing and ci deployments but no matter what i try it seems to think my private key is invalid. You wouldnt happen to know where the hell i enter the public key for a private key? as the plugin wants a username not the public key (i also tried my username for github juust incase). Ive seen many mentions of using an ssh agent but that just seem a weird way to go about it. ive never used ssh key for access to github, i tend to use personal access tokens, which are then defined as a 'username with password' in jenkins, see link below for how to generate one if you want to go down that route:- https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line Quote Link to comment
phyzical Posted January 29, 2020 Share Posted January 29, 2020 18 hours ago, binhex said: ive never used ssh key for access to github, i tend to use personal access tokens, which are then defined as a 'username with password' in jenkins, see link below for how to generate one if you want to go down that route:- https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line hey thanks for the reply! unfortunately github is only 1 step for me, i then need to checkout a bitbucket repo for my common infrastructure (which access tokens may also work) and then i will need to be able to deploy to my host box so i will still need ssh keys to work guessing your normal usecase is just for testing and not deployment? i will keep tinkering and see if i can get it to work. worse case i suppose i can fall back to the vm solution for a build agent, just trying to avoid it if i can at this time. i will post back when i get to a solution incase it helps someone in the future. Thanks again! Quote Link to comment
phyzical Posted February 1, 2020 Share Posted February 1, 2020 just a followup incase anyone else runs into this. Jenkins supports private keys but there is nowhere to upload the public key, so what you need to do is either copy the private and public keys in question onto the container or just run Quote pacman -S openssh then generate an ssh key on the container, then upload that private key into jenkins Quote Link to comment
phyzical Posted February 5, 2020 Share Posted February 5, 2020 +1 to the suggestion for using docker plugin, can even just hook it up to the box running this container and it can dynamically spin up and kill docker containers per build. works great! thanks again @binhex Quote Link to comment
oko2708 Posted March 16, 2020 Share Posted March 16, 2020 Hello, Thanks for maintaining this container, its working great so far. However, I did run into a problem and I'm sure I am just not understanding something correctly, but somehow I cannot get Jenkins to run a docker job. I have a very simple jenkinsfile: pipeline { agent { docker { image 'node:13-alpine' args '-p 3000:3000' } } stages { stage('Build') { steps { sh 'npm install' } } } } I have enabled the docker plugin for Jenkins and added a docker installation in the Global Tool Configuration: And finally I also passed the docker.sock to the container: However Jenkins build fail with "docker: command not found" What am I missing? I have been searching for an answer for a couple of hours now, but I can't find a solution. Quote Link to comment
phyzical Posted July 5, 2020 Share Posted July 5, 2020 @oko2708 i might have done it wrong but i got it working by exposing the docker port on my unraid box then configuring a cloud tcp://192.168.XX.XX:XXXX then i just create an cloud agent template this was also a bit annoying as the docker image then needed to apply the jlnp agent stuff i.e `FROM jenkins/jnlp-slave` if you figure out how to "just use docker images" let me know as it feels kinda iffy. @binhex i updated my image earlier today and then jenkis just died prompting something along the line of ` libfreetype.so.6: cannot open shared object file:` in JDK 8. is this just a jenkis issue? i assume your auto building based on tags in jenkins land or something. i just rolled back to 2.239 for now 1 Quote Link to comment
413rate_sship Posted July 10, 2020 Share Posted July 10, 2020 +1 for the `libfreetype.so.6` error on the latest release. First two lines of the error received when accessing the web console below. AWT is not properly configured on this server. Perhaps you need to run your container with "-Djava.awt.headless=true"? See also: https://jenkins.io/redirect/troubleshooting/java.awt.headless java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory Tried adding `-Djava.awt.headless=true` as a java option and still no dice. This thread looked somewhat related: https://github.com/GoogleContainerTools/distroless/issues/321 Quote Link to comment
413rate_sship Posted July 10, 2020 Share Posted July 10, 2020 quick update: pinned to binhex/arch-jenkins:2.242-1-01 and no issues with `libfreetype.so.6` Quote Link to comment
Grifsworld Posted July 14, 2020 Share Posted July 14, 2020 I am also having the libfreetype.so problem! I have also pinned to 2.242-1-01 with no issues. Quote Link to comment
binhex Posted July 20, 2020 Author Share Posted July 20, 2020 On 7/14/2020 at 5:39 AM, Grifsworld said: I am also having the libfreetype.so problem! I have also pinned to 2.242-1-01 with no issues. fixed the image, a new image is now building, check for updates in an hour from now. Quote Link to comment
rtm516 Posted August 2, 2020 Share Posted August 2, 2020 (edited) I was getting an error with this container after updating, about it missing a dir. chown: cannot access '/var/cache/jenkins': No such file or directory I ended up fixing it by adding this as a post argument, and I was wondering if this is caused by something strange on my install or an issue with the container. ; docker exec binhex-jenkins /bin/bash -c "mkdir /var/cache/jenkins" Edit: After some more usage it seems to be broken, these are my container settings any help would be appriciated. https://imgur.com/a/DiZN5vD (add me on discord if you want any more info @rtm516#2107) Edited August 3, 2020 by rtm516 Quote Link to comment
nrgbistro Posted December 21, 2021 Share Posted December 21, 2021 I'm also having the same error as @oko2708. How do I properly set up docker in this Jenkins container? I've installed the docker and docker pipeline plugins, set up docker to automatically download in global tool configuration, and tried mapping the Unraid docker.sock to the container. I'm not really sure what else to try and I can't find any fix for this on the internet. Quote Link to comment
Domica Posted January 26, 2022 Share Posted January 26, 2022 Came here because of the same question/issue as @oko2708 and @nrgbistro. Hope someone will help us! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.