Tag: jenkins

如何在Windows 10的Windows Docker容器中运行Jenkins?

我想在我的Windows 10盒子上的Docker容器中运行Jenkins。 我正在使用Windows容器,而不是Linux容器。 我试图使用这个指南: https : //jenkins.io/doc/book/installing/#on-windows然而,input的命令是用于Linux容器,而不是Windows容器。 由于1709更新( https://github.com/docker/for-win/issues/1221 )之后的一个已知问题,我似乎无法让Linux容器工作。 我试过“docker拉jenkins”,但没有amd64版本拉。 这里有什么想法? 我唯一的想法是试图找出如何从Windows容器中运行Java,所以我可以使用Jenkins .war文件呢?

Jenkins curl:(52)来自服务器的空回复

我在做几个阶段的声明式pipe道。 而在其中一个阶段,我想在tomcat映像上运行docker上部署war文件。 对于这个我使用命令curl。 但我总是在jenkins上得到以下错误: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0 0 15.7M 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0 curl: (52) Empty reply from server 这是我的代码: pipeline { […]

如何修复kubernetes中的dockernetworking?

我有一个kubernetes集群,并使用jenkins pipe道jenkins: podTemplate(label: 'pod-golang', containers: [ containerTemplate(name: 'golang', image: 'golang:latest', ttyEnabled: true, command: 'cat'), containerTemplate(name: 'docker', image: 'docker:17.11-dind', ttyEnabled: true, command: 'cat'), ], volumes: [hostPathVolume(hostPath: '/var/run/docker.sock', mountPath: '/var/run/docker.sock')] ) { node('pod-golang') { def app String applicationName = "auth" String buildNumber = "0.1.${env.BUILD_NUMBER}" stage 'Checkout' checkout scm container('docker') { stage 'Create docker image' app = docker.build("test/${applicationName}") […]

jenkinspipe道标记为失败,但所有步骤都成功了

我build立了pipe道来构build我的基于wildfly-swarm的微服务构builddocker镜像,并将其推送到docker仓库。 所以我设置了pipe道脚本并执行了构build,并从日志(附带下图)中看到构build成功,但在舞台视图中出现错误状态,出现错误:“Script returned exit code 1”。 而失败的脚本是: docker build -f Dockerfile -t swarm-microservice . 如果将脚本执行从以下位置更改,则无关紧要: sh '''docker build -f Dockerfile -t swarm-microservice .''' 至: script { docker.build("swarm-microservice", '.') } 我也尝试通过改变脚本来改变脚本结果的输出: sh '''docker build -f Dockerfile -t swarm-microservice . || true ''' 但它没有帮助。 我错过了什么? Started by user test [Pipeline] node Running on node-lin02 in /build/workspace/XYZ/some-docker-image [Pipeline] […]

Jenkins与Dockerpipe道问题

当我试图运行一个Jenkinspipe道项目时,它在“docker pull node:6-alpine”下给出了这个消息: <.jenkins/workspace/simple-node-js-react-npm-app@tmp/durable-431710c5/script.sh: line 2: docker: command not found script returned exit code 127> 我不知道这里发生了什么,我不能访问错误中提到的目录。 我对jenkins很新。

如何在jenkins服务器中触发作业创build,并在另一个jenkins服务器中自动创build相同的作业

任何插件或Jenkins都可以在另一台服务器上创build一个具有相同configuration的作业。 docker工人可以吗?

在Jenkins声明式pipe道中将一个人工制品复制到另一个人员身上

我想使用Jenkins声明式pipe道和代理语法来构build我想要部署到侧面汽车容器的制造品,如下面的伪代码所示: pipeline { agent none stages { stage('Build Artefact') { agent { docker 'build-agent' } steps { < I want to create the artefact to deploy to a side car container here > } } stage('Deploy Artefact') { agent { docker 'side-car' } steps { < I want to deploy the artefact created in the […]

在Jenkinspipe道中为Docker容器添加额外的运行参数

在我的Jenkinspipe道中,我声明了一个代理: agent{dockerfile true} 我的Dockerfile位于源代码库的根目录下,我不想改变它。 现在我的问题是:当Jenkins运行容器时,如何提供额外的参数? 我必须安装Docker套接字(用于在我的pipe道中运行docker命令),如下所示: -v /var/run/docker.sock:/var/run/docker.sock 谢谢你的帮助!

在Dockerfile里运行“From ..”docker镜像

我正在构build一个构buildJenkins的映像,我试图在运行时使用Jenkins上的插件,所以,我需要在插件执行之前运行Jenkins。 我执行它像dockerbuild设-tdocker文件和我所获得的错误: jenkins.JenkinsException:请求中的错误:[错误99]无法分配请求的地址 我认为问题是当插件被执行时,猜猜Jenkins正在运行,而不是。 FROM foxylion/jenkins MAINTAINER Mishel Uchuari <dmuchuari@hotmail.com> RUN /usr/local/bin/install-plugins.sh workflow-remote-loader workflow-aggregator build-pipeline-plugin ENV JENKINS_USER replicate ENV JENKINS_PASS replicate USER root RUN apt-get -y update && apt-get -y upgrade RUN apt-get install -y apt-utils RUN apt-get install -y python-pip RUN apt install -y linuxbrew-wrapper RUN useradd someuser -m -s /bin/bash USER someuser RUN […]

jenkinsdocker工人代理pipe道没有根

我有一个非常基本的pipe道Jenkinsfile旋转docker集装箱: pipeline { agent { dockerfile { args '-u root' } } stages { stage('Test') { steps { echo 'Testing…' sh 'whoami' } } } } 问题是我在我的容器中设置的应用程序被configuration为必须以自己的用户身份运行,以root身份运行将导致应用程序在启动时失败。 如果我将args更改为args '-u foo' ,则在构build容器后出现错误: /var/lib/jenkins/workspace/*/*/jenkins-log.txt permission denied 这个path在容器和jenkins服务器中都存在。 我在容器内的path有问题。 其中一个保存在该位置的文件也是一个scripts.sh – jenkins将pipe道中的所有sh命令转录到该文件并运行该文件。 这使我陷入困境 – 看起来好像Jenkins要求以root身份运行容器来实际发送任何命令,或者与容器内的任何内容交互,但容器将不能正确构build,除非我使用foo 。 有没有人有任何想法解决这个问题的好方法?