One of the customers I do work for recently decided that, in addition to supplying native deployment-automation code targeting their desired cloud-...
For further actions, you may consider blocking this person and/or reporting abuse
I've always just run them until they work. I'm not sure there's another way to validate the whole thing unless they've made adding exceptions to the script security defaults easier recently.
Adding your code to a global shared library assumes the code is "trusted" meaning you should not have to validate each and every call outside of the sandbox.
jenkins.io/doc/book/pipeline/share...
"These libraries are considered "trusted:" they can run any methods in Java, Groovy, Jenkins internal APIs, Jenkins plugins, or third-party libraries. This allows you to define libraries which encapsulate individually unsafe APIs in a higher-level wrapper safe for use from any Pipeline"
That looks new! The Jenkins instance I was working with was a couple years old and I don't remember seeing anything like that functionality.
Yeah. I'd been doing similar. However, as we've added new people to this particular project and have more "never used Jenkins" people on the team writing Jenkins jobs, more in the way of simple mistakes have been happening.
Always nice to get a green from Travis saying that at least the syntax of something is correct.
I'd recommend the following:
We generally just define tests within our ..yml files. With the various versions of git clients in use, it's more reliable than hoping that a given user's git client is - or can even be - configured to use standardized pre-commit hooks.
Our overall model is "work in a branch of your own fork, then PR back to the appropriate branch of the root project".
This is what I'm looking for. Happen to have any examples? As mentioned above, when using things like GitLab's built-in CI tool or tools like Travis, we've mostly been just handing off tests by way of file-extensions (
.jsonfiles going throughjq;.shfiles going throughShellCheck; etc.). I'd been hoping there was a similar linter tool out there to hand off to. If we had to go the "roll your own route" (as your above seems to hint at), would be super helpful to have something tosteal fromuse as a reference.github.com/june07/sublime-Jenkinsf...
Sublime Text is my goto so I wrote that plugin to leverage Jenkins' own declarative linter.
Uploading the Jenkinsfile and running the pipeline on each edit was definitely a broken workflow and took loads of time.