These are chat archives for jenkinsci/jenkins

5th
Sep 2017
Knut Schleßelmann
@kschlesselmann
Sep 05 2017 08:39

Hi, currently I try to run the following code

docker.image('openjdk:8').inside { }

in my pipeline. Now my build fails since jenkins doesn't find the image on the host and then tries to get it from our registry even though I don't use withRegistry. Why doesn't Jenkins try to pull the image from docker hub?

Oleg Nenashev
@oleg-nenashev
Sep 05 2017 09:09
@kschlesselmann Maybe you have custom Environment Variables in the system, which make your Docker client to go to a custom registry
Fabricio
@ofabricio
Sep 05 2017 12:30
does anyone know a plugin to check code formatting?
Knut Schleßelmann
@kschlesselmann
Sep 05 2017 12:35
@ofabricio language? features? I'm a huge fan of sonarqube
Fabricio
@ofabricio
Sep 05 2017 12:36
java
Knut Schleßelmann
@kschlesselmann
Sep 05 2017 12:37
@ofabricio sonar ftw!
Fabricio
@ofabricio
Sep 05 2017 12:37
i wonder if there is something to apply the formatting rules intellij offers :smile:
i'll look into it, ty
Knut Schleßelmann
@kschlesselmann
Sep 05 2017 12:38
well … what would apply do? Do you really want to commit those changes then again via CI? :-S
Fabricio
@ofabricio
Sep 05 2017 12:40
i didn't get your last comment knut
Henning Hoefer
@hho
Sep 05 2017 12:41
he thinks you want to auto-format on the ci server and then commit the changes (if any).
i think you're just looking for a checkstyle ruleset that enforces intellij's formatting rules...
Fabricio
@ofabricio
Sep 05 2017 12:42
just warning about formating issues is ok
exactly
i could export the intellij code style xml config file and tell the CI to check for it using that rules
would be great
but any checker is ok by now... my team is crazy... each person makes a diff style lol and to tell otherwise doesn't seem to work lol
Knut Schleßelmann
@kschlesselmann
Sep 05 2017 12:47
@ofabricio Use sonar :-) static code analysis at its finest :-)
Fabricio
@ofabricio
Sep 05 2017 12:48
i will ty very much!
Tim Oien
@mroien
Sep 05 2017 18:07

How do you use JOB_NAME and BUILD_NUMBER in Jenkins inside the desired capabilities in JavaScript?

build: ...

for Java the docs say

DesiredCapabilities capabilities = new DesiredCapabilities();
// ...
capabilities.setCapability("build", System.getenv("JOB_NAME") + "__" + System.getenv("BUILD_NUMBER"));
stephenmenton
@stephenmenton
Sep 05 2017 19:50
how would one determine the start time of the current stage without hitting the REST API?