Commit Graph

80 Commits

Author SHA1 Message Date
Tim Jacomb 9b54caaf57
Remove install-plugins.sh (#1408) 2022-06-26 09:37:38 +01:00
Philippe scorsolini 0e8271bf69
ignore SC2086 as in previous usage 2020-10-22 12:45:14 +02:00
Philippe scorsolini f223e4935b
removing quotes around CURL_OPTIONS
in case CURL_OPTIONS is set to more than one flag the double quotes around it would not allow to recognize all the flags and break the script.
2020-10-22 12:00:18 +02:00
Alex Earl f4dd8f63b3
Merge pull request #988 from HeyLazySunnyKid/master
Fix curl options
2020-09-28 12:22:23 -07:00
Denis Kalyuzhnyy e54df53634 Fix quotas 2020-09-14 11:48:24 +03:00
Denis Kalyuzhnyy bdfe6b8ac2 Fix curl options 2020-09-14 11:36:49 +03:00
Alex Earl bc906140bc
Update install-plugins.sh
Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
2020-09-10 06:03:18 -07:00
Alex Earl d6ecdcfebf
Fix typo 2020-09-10 05:10:02 -07:00
Alex Earl aee7b5397d
Remove deprecated plugins.sh and add warning to install-plugins.sh 2020-09-10 05:07:17 -07:00
Alex Earl 778e38746e
Fix comment 2020-06-18 20:13:37 -07:00
Alex Earl 9f10ee2e61
Fix shellcheck issues 2020-06-18 18:52:57 -07:00
Alex Earl d1d51c8da7
Fix install-plugins.sh for update-center changes
This uses the ?version= URL to determine the version specific
update center. This is the canonical way to get the version
specific update center, if one exists. Otherwise, it will
return the update center for the latest.
2020-06-18 16:05:39 -07:00
Alex Earl 0832831fa2 #709,#861 - Make the REF_DIR configurable in plugin installation scripts (#866)
* Fix jenkinsci/docker/issues/861

This allows overriding the default REF dir

* Fix other references to hardcoded offset

* Fix test

* Add REF ENV item

This will make it so that REF will have a default value
2019-08-16 10:40:43 +02:00
Ramon Leon fc0053c1f9 #857 - Make the Jenkins WAR path configurable by the `JENKINS_WAR` env property (#873)
* [#857] Make the jenkins.war configurable by JENKINS_WAR env property

* [#857] A final new line

* [#857] Add env variables documentation and minor fixes

* [#861] Merge documentation sections

* [#861] Format default values
2019-08-16 10:33:51 +02:00
Gavin Mogan 5ee86281de Use the readarray bash function to split the data a little cleaner 2019-06-09 22:59:48 -07:00
Leland Sindt - Touchnet c2cc154381
include $url 2019-03-26 11:54:45 -05:00
Graeme Wilson 01a0c9433a allow install-plugins.sh to take a url as an option 2019-02-20 10:10:42 +08:00
Carlos Sanchez a7bdb0450a
Merge pull request #786 from carlossg/no-war
Do not fail install-plugins if war is not found
2019-02-11 10:36:08 +01:00
nickolay-martinov 9639c9dfd1 Try to tell shellcheck to allow to fix jenkinsci/docker/#784 2019-01-31 12:04:29 +03:00
nickolay-martinov 8361eb1191 Fixes jenkinsci/docker/#784 2019-01-31 11:41:49 +03:00
Baptiste Mathus a23c3a46ef
Merge pull request #587 from Aigrefin/patch-1
[BUG] build do not fail when cleaning up but there is no lock files
2019-01-11 12:31:36 +01:00
Carlos Sanchez 5ebbd1965a Install plugins even when war is not present 2018-12-24 17:28:58 +01:00
Carlos Sanchez c120d4673a Do not fail if war is not found
Remove unbound variable
2018-12-24 17:02:15 +01:00
Carlos Sanchez b9b1d05ba8 Make 3 attempts the default 2018-11-26 09:23:01 +01:00
Carlos Sanchez 851f538a53 Retry transient errors 3 times, and 3 times each 2018-11-24 11:10:32 +01:00
Carlos Rodríguez Hernández 255f924549 Use variable to calculate version (#718)
* Quote to prevent word splitting, or split robustly with mapfile or read -a.

* Use variable to calculate version and fix plugins path inside .war

* Update install-plugins.sh

* Undo unrelated changes
2018-11-09 15:00:33 +03:00
Baptiste Mathus df0efde3b4 Bump to 0.4.7
SC1117 not fixed, but ignored, since it's been retired already in > 0.5.0,
cf. https://github.com/koalaman/shellcheck/wiki/SC1117 so I'm ignoring it
in the makefile and we'll remove it when bumping to shellcheck > 0.5.0
in the future.
2018-10-22 21:52:48 +02:00
Brendan MacDonell 610f266227
Make shellcheck happy 2018-08-07 16:15:39 -07:00
Brendan MacDonell 846224d85b
Fix failure loop if installing plugins fails
`install-plugins.sh` detects failures by checking for the presence of
"$REF_DIR/failed-plugins.txt". However failed-plugins.txt was not deleted
before the script starts, so errors in a prior run will cause all future
runs to fail. This causes problems with the jenkins helm chart: since
$REF_DIR points to an emptyDir volume, failed-plugins.txt persists until
the pod is deleted or moved to another node.
2018-08-07 16:05:19 -07:00
Oleg Nenashev 509538014f [JENKINS-52028] -Support downloading plugins from the Incrementals repo 2018-06-19 10:14:53 +02:00
Carlos Sanchez bb82a3f057
Merge branch 'master' into curl-retry 2018-04-24 14:31:04 +02:00
Carlos Sanchez dc6193987d Fix #373 #470 Retry curl calls downloading plugins
curl may fail if mirror is flaky or unreachable
They retry will likely get another mirror
2018-02-05 18:22:46 +01:00
Matteo Turra f315835e24 issue #516
fix install-plugins using a plugin list with windows line endings
2018-01-09 16:41:41 +01:00
guessi d85be653b5 Enhance support for write commnet in plugins.txt
- add ability to write comment in plugins.txt
- remove leading spaces/tabs
- remove trailing spaces/tabs
- protect against empty lines

Enhanced #505

Signed-off-by: guessi <guessi@gmail.com>
2017-12-09 17:50:57 +08:00
Julien Tellier a1a9790a72 using -regex instead of -iregex to be compatible with docker-alpine 2017-10-14 11:08:33 +02:00
Julien Tellier 20efae0596 read of find lockfiles with -r to avoid mangling backslashes 2017-10-13 18:42:49 +02:00
Julien Tellier 36fe0daca2 delete only lockfiles without force if they are present 2017-10-13 18:40:35 +02:00
Carlos Sanchez 24a2170d01 Merge pull request #588 from clokanku/patch-1
Consider non empty last line of plugins.txt
2017-10-12 17:51:37 +02:00
Clo 542fcdc558 Consider non empty last line of plugins.txt 2017-10-09 13:38:31 +02:00
Julien tellier 4629fff8fb build do not fail when cleaning up but there is no lock files 2017-10-09 11:42:01 +02:00
Jonas Linde 8b5649110c Issue #559 - Do not reinstall already installed plugins 2017-08-23 17:06:01 +02:00
Oleg Nenashev f99e4b223c Issue #538 - Add support of downloading plugins from the Experimental UC (#539)
* Issue #538 - Add support of downloading plugins from the Experimantal UC

* Issue #538 - Add Test
2017-07-24 09:38:28 +02:00
Reinhard Nägele 2898b724af Resolve plugins from version-specific update center (#495)
Reads Jenkins version from the  manifest and checks if an update center
for this version is available. If this is the case, latest plugin
versions are resolved from this update center. This ensures that
latest plugin versions are always compatible to the LTS version if
an LTS version is used.

Fixes #494
2017-06-01 16:08:37 +02:00
Carlos Sanchez ed1a330c47 Run shellcheck on build (#499)
And fix all the errors and warnings reported
2017-05-27 18:22:27 +02:00
Patrick Hobusch e23d8ec659 Add plugins.txt file compability for install-plugins.sh
The new install-plugins.sh script removed the possibility to pass a file
containing a list of plugins that was given with the 'old' plugins.sh
script, although this functionality can be provided with only a few
lines more.

Now, when the install-plugins.sh script is called with only a single
argument that matches an existing file on the file system, it is assumed
that this file contains the list of plugins that should be installed,
newlines are replaced by spaces and this manipulated content is used as
the plugins list for further processing.
2016-10-17 13:17:51 +02:00
Carlos Sanchez 2fb0684fe6 Fix race condition in tests, print with newline at end 2016-10-06 14:16:20 -07:00
Carlos Sanchez 21b0f37a8b Increase default curl timeout to 20 as tests are failing 2016-10-06 13:34:25 -07:00
Raymond Barbiero 6233a4d231 make curl settings configurable 2016-10-04 18:04:09 -04:00
Charles Duffy 3eec42cbad Full best-practices / shellcheck-compliance pass
- 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
2016-09-26 17:03:10 +02:00
Gareth Harcombe-Minson d6a7512eec Remove zip dependency and replace with unzip equivalent (#354) 2016-09-26 16:59:36 +02:00