- Use modern `$()` syntax vs backticks [see [SC2006](https://github.com/koalaman/shellcheck/wiki/SC2006)]
- Always check for, and bail on, failures of `cd`. [see [SC2164](https://github.com/koalaman/shellcheck/wiki/SC2164)]
- Avoid `for foo in $(...)`, per [DontReadLinesWithFor](http://mywiki.wooledge.org/DontReadLinesWithFor)
- Avoid parsing `ls` to find subdirectories when `for d in "$dir"/*/` does the job; see also [ParsingLs](http://mywiki.wooledge.org/ParsingLs)
- `\s` is not specified in POSIX ERE (thus, not guaranteed to be available in bash-native regexes unless local platform's C library's regex implementation extends standard); use `[[:space:]]` instead.
- Avoid unnecessary deviations from POSIX sh specification:
- `echo -e` violates (not just extends) POSIX, doesn't work as expected in bash compiled with `--enable-xpg-echo-default`; [POSIX specification](http://pubs.opengroup.org/onlinepubs/009604599/utilities/echo.html) suggests `printf` as replacement (see APPLICATION USAGE section).
- `function` keyword not specified in POSIX, provides no benefit over standard-compliant syntax
Sometimes (like today ... and many other times unfortunately) the main
Jenkins update center is down and you cannot build a Jenkins Docker image.
It is much better than to include the full base URL as JENKINS_UC_DOWNLOAD
so that the ENV variable can be overridden to point to an up-and-running site.
Example:
ENV JENKINS_UC_DOWNLOAD http://mirrors.clinkerhq.com/jenkins
- Add `-f` flag for curl to fail script on http error
- Add plugin version check, use `latest` if empty
- Show message on plugin download start and failure
- Silent downloading
this is actually correct on the README.md, so alternately this line can just be removed entirely if the idea of merging changes to comments doesn't sit well with you. ;-)
copy files from /sur/share/jenkins/ref to jenkins_home
so jenkins_home can be initialized with some reference
configuration/plugins but still can be customized and
be persisted on a volume
utility script to install plugins at startup based on
support-core plugin format