我在 config.jelly 中使用以下几行
<f:entry title="${%Report file extension}" field="ReportExtension">
<select name="ReportBuilder.ReportExtension" selected = "${instance.ReportExtension}">
<option value="log" selected="${instance.ReportExtension=='log'}">log</option>
<option value="html" selected="${instance.ReportExtension=='html'}">html</option>
</select>
</f:entry>
Run Code Online (Sandbox Code Playgroud)
如果我更改 Jenkis 作业中的值并随后运行该作业,则会使用正确的值,但如果我再次编辑该作业,则不会保存选择并再次存储默认值。
有没有人见过这个?我尝试了几种不同的方法,但我无法让它发挥作用。
我已在运行 Google Cloud 计算引擎的 Ubuntu 计算机上安装了 Jenkins。
为此,我运行了以下命令:
sudo apt-get update
sudo apt-get install apache2 libapache2-mod-php5 php5-mcrypt php5-mysql git openjdk-7-jre openjdk-7-jdk -y
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
Run Code Online (Sandbox Code Playgroud)
Jenkins 似乎安装得很好,但是当我访问端口 8080 上的公共 IP 地址时,那里什么也没有。我读到可能是 Apache 使用端口 8080,所以我编辑/etc/default/jenkins并将端口更改为 8081。我仍然在该端口上看不到 jenkins。
我还重新启动了该服务,但没有任何变化。如果我做:
sudo netstat -plntu
Run Code Online (Sandbox Code Playgroud)
我懂了:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Windows 10 机器上的 Docker 容器中运行 Jenkins。我使用的是 Windows 容器,而不是 Linux 容器。
我尝试使用本指南: https: //jenkins.io/doc/book/installing/#on-windows 但是,输入的命令适用于 Linux 容器,而不是 Windows 容器。
由于 1709 更新后的已知问题( https://github.com/docker/for-win/issues/1221 ) ,我似乎无法让 Linux 容器工作。
我尝试了“docker pull jenkins”,但是没有 amd64 版本可供拉取。
这里有什么想法吗?我唯一的另一个想法是尝试弄清楚如何从 Windows 容器运行 Java,以便我可以使用 Jenkins .war 文件?
我正在尝试在 Jenkins 上配置我的项目,以便每次提交都会导致自动构建。当我yarn install使用 Jenkins NodeJS 脚本运行时,它拒绝安装从 git 存储库导入的依赖项。我正在按照以下方式进行操作。
"some-component": "git+https://bitbucket.org/owner/repo.git"
Run Code Online (Sandbox Code Playgroud)
它显示以下错误:
error Command failed.
Exit code: 128
Command: git
Arguments: clone git+https://bitbucket.org/owner/repo.git
Output:
fatal: destination path 'some path' already exists and is not an empty directory.
error Command failed with exit code 1.
Run Code Online (Sandbox Code Playgroud)
如果文件为空,则显示以下错误
error Couldn't find the binary git
error Command failed with exit code 1.
Run Code Online (Sandbox Code Playgroud)
尽管同样yarn install可以在 IDE(例如 VS Code)上完美运行。
yarn install我使用以下代码在 Jenkins 上的 NodeJS 脚本中执行
var exec = require('child_process').exec,
child;
child …Run Code Online (Sandbox Code Playgroud) 我正在尝试运行 jenkins war 文件,但收到此错误:
: Container startup failed
java.io.IOException: Failed to start Jetty
Run Code Online (Sandbox Code Playgroud)
这是我正在运行的命令:
java -jar jenkins.war
Run Code Online (Sandbox Code Playgroud)
这是完整的错误:
Mar 25, 2018 1:55:50 AM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start Jetty
at winstone.Launcher.<init>(Launcher.java:154)
at winstone.Launcher.main(Launcher.java:352)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at Main._main(Main.java:246)
at Main.main(Main.java:91)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:366)
at …Run Code Online (Sandbox Code Playgroud) 有没有办法通过groovy控制台解锁jenkins可锁定资源?我们认为我们在锁定时重新启动了实例,现在作业都被认为锁定已被卡住。
有没有办法/命令 - 我可以从 versions.sbt 文件中提取应用程序版本?
我有一个 gulp 任务getBuildNumber它使用子进程来执行脚本。
gulp.task('getBuildNumber', function() {
var buildNumber = child_process.execSync("echo $BUILD_NUMBER").toString().trim();
console.log(buildNumber);
});
Run Code Online (Sandbox Code Playgroud)
当我为 gulp 运行以下命令时
npm run gulp -- getBuildNumber
Run Code Online (Sandbox Code Playgroud)
我总是得到输出$BUILD_NUMBER而不是实际的 Jenkins 版本号。
有人可以建议如何继续吗?
Bitbacket 关闭 TLS v1.0 和 v1.1。我们的 Jenkins 由于旧的 Git 而失败:
git --version
git version 1.8.2.3
+ GIT_CURL_VERBOSE=1
+ git ls-remote https://bitbucket.org/
* Couldn't find host bitbucket.org in the .netrc file, using defaults
* About to connect() to bitbucket.org port 443
* Trying 18.205.93.1... * connected
* Connected to bitbucket.org (18.205.93.1) port 443
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* Unknown SSL protocol error in connection to bitbucket.org:443
Run Code Online (Sandbox Code Playgroud)
我查看了 Git 发行说明:
git clone --depth=1 https://github.com/git/git …Run Code Online (Sandbox Code Playgroud)