Skip to content

Commit 2ef98d6

Browse files
authored
Merge pull request #34 from jglick/release-drafter
[INFRA-2412] Prepare for Release Drafter & migrate from wiki
2 parents 5a60e78 + 4fd7193 commit 2ef98d6

File tree

7 files changed

+215
-38
lines changed

7 files changed

+215
-38
lines changed

.github/release-drafter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_extends: .github
2+
tag-template: ssh-agent-$NEXT_MINOR_VERSION

README.md

Lines changed: 76 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,99 @@
1-
Jenkins SSH Agent Plugin
2-
========================
1+
# SSH Agent Plugin
32

4-
Read more: [http://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin](http://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin)
3+
This plugin allows you to provide SSH credentials to builds via a
4+
ssh-agent in Jenkins.
55

6-
Development
7-
===========
6+
# Requirements
87

9-
Start the local Jenkins instance:
8+
Currently all **Windows** nodes (including the master) on which this
9+
plugin will be used must have the [Apache Tomcat Native
10+
libraries](http://tomcat.apache.org/native-doc/)
11+
installed. As of 1.0 should be unnecessary for Unix nodes. As of 1.14
12+
unnecessary if `ssh-agent` is installed.
1013

11-
mvn hpi:run
14+
# Configuring
1215

16+
First you need to add some SSH Credentials to your instance:
1317

14-
How to install
15-
--------------
18+
Jenkins \| Manage Jenkins \| Manage Credentials
1619

17-
Run
20+
![](docs/images/Screen_Shot_2012-10-26_at_12.25.04.png)
1821

19-
mvn clean package
22+
Note that only Private Key based credentials can be used.
2023

21-
to create the plugin .hpi file.
24+
Then configure your build to use the credentials:
2225

26+
![](docs/images/Screen_Shot_2012-10-26_at_12.26.13.png)
2327

24-
To install:
28+
And then your build will have those credentials available, e.g.
2529

26-
1. copy the resulting ./target/ssh-agent.hpi file to the $JENKINS_HOME/plugins directory. Don't forget to restart Jenkins afterwards.
30+
![](docs/images/Screen_Shot_2012-10-26_at_11.54.21.png)
2731

28-
2. or use the plugin management console (http://example.com:8080/pluginManager/advanced) to upload the hpi file. You have to restart Jenkins in order to find the pluing in the installed plugins list.
32+
From a Pipeline job, use the `sshagent` step.
2933

34+
# Installation Example: MacOSX (10.7.5)
3035

31-
Plugin releases
32-
---------------
36+
**Irrelevant in 1.14+ when `ssh-agent` is available in the path.**
3337

34-
mvn release:prepare release:perform -B
38+
Prerequisites:
3539

40+
- JDK7. The tomcat native libraries target the java 7 version.
41+
- APR - this seems to be preinstalled in /usr/lib/apr.
3642

37-
License
38-
-------
43+
Note that tomcat itself is not needed. This works fine with winstone
44+
(just running jenkins jar from command line).
3945

40-
(The MIT License)
46+
Download and extract the tomcat native
47+
library: <http://tomcat.apache.org/download-native.cgi>
4148

42-
Copyright © 2012, CloudBees, Inc., Stephen Connolly.
49+
tar -zxvf tomcat-native-1.1.XX-src.tar.gz
4350

44-
Permission is hereby granted, free of charge, to any person obtaining a copy
45-
of this software and associated documentation files (the "Software"), to deal
46-
in the Software without restriction, including without limitation the rights
47-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48-
copies of the Software, and to permit persons to whom the Software is
49-
furnished to do so, subject to the following conditions:
51+
Build the native library:
5052

51-
The above copyright notice and this permission notice shall be included in
52-
all copies or substantial portions of the Software.
53+
cd tomcat-native-1.1.XX/jni/native
5354

54-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60-
THE SOFTWARE.
55+
./configure --with-apr=/usr/bin/apr-1-config
56+
57+
make && sudo make install
58+
59+
Build the java interface:
60+
61+
cd ..
62+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home
63+
64+
ant build
65+
66+
ant jar
67+
68+
Copy the output jar somewhere suitable for inclusion in your jenkins
69+
CLASSPATH.
70+
71+
Set environment variables prior to starting jenkins:
72+
73+
export DYLD_LIBRARY_PATH=/usr/local/apr/lib
74+
export CLASSPATH=/path/to/tomcat-native-1.1.XX.jar
75+
java -jar jenkins.war
76+
77+
Additionally, you might have to add bouncycastle to your JCE providers.
78+
If you attempt to use the plugin and get an exception like the
79+
following:
80+
81+
java.lang.IllegalStateException: BouncyCastle must be registered as a JCE provider
82+
83+
Then you may need to configure the jce provider. One way is to do this
84+
right in the JRE, so if Jenkins is using the same jdk as above, edit
85+
86+
/Library/Java/JavaVirtualMachines/jdk1.7.0\_17.jdk/Contents/Home/jre/lib/security/java.security,
87+
and add the following line:
88+
89+
security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider
90+
91+
Then, restart jenkins.
92+
93+
From there, configure using the instructions above.
94+
95+
# Version History
96+
97+
For new versions, see [GitHub releases](https://github.com/jenkinsci/ssh-agent-plugin/releases).
98+
99+
For old versions, see the [old changelog](docs/old-changelog.md).
43 KB
Loading
36.6 KB
Loading
13.7 KB
Loading

docs/old-changelog.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
For new versions, see [GitHub releases](https://github.com/jenkinsci/ssh-agent-plugin/releases).
2+
3+
### Version 1.17 (2018-10-02)
4+
5+
- Did not properly interact with `withDockerContainer` when run on a
6+
machine with `DISPLAY=:0` set.
7+
8+
### Version 1.16 (2018-07-30)
9+
10+
- [Fix security
11+
issue](https://jenkins.io/security/advisory/2018-07-30/#SECURITY-704)
12+
13+
### Version 1.15 (2017-04-06)
14+
15+
- [issue@42093](#) Fixed quoting for askpass in
16+
command-line implementation. 
17+
18+
### Version 1.14 (2017-02-10)
19+
20+
- [JENKINS-36997](https://issues.jenkins-ci.org/browse/JENKINS-36997)
21+
New default implementation that uses command-line `ssh-agent`.
22+
Should fix various problems with crypto APIs,
23+
`docker.image(…).inside {sshagent(…) {…}}`, etc.
24+
- [JENKINS-38830](https://issues.jenkins-ci.org/browse/JENKINS-38830)
25+
Track credentials used in the wrapper.
26+
- [JENKINS-35563](https://issues.jenkins-ci.org/browse/JENKINS-35563)
27+
Fixes to credentials dropdown.
28+
29+
### Version 1.13 (2016-03-03)
30+
31+
- [JENKINS-32120](https://issues.jenkins-ci.org/browse/JENKINS-32120)
32+
Register Bouncy Castle on the remote agent by using Bouncy Castle
33+
API plugin
34+
35+
Apparently does not work in some versions of Jenkins; see
36+
[JENKINS-36935](https://issues.jenkins-ci.org/browse/JENKINS-36935).
37+
38+
### Version 1.12 (2016-03-03)
39+
40+
- **Wrong release**. Release process broken due a network issue.
41+
42+
### Version 1.11 (2016-03-03)
43+
44+
- [JENKINS-35463](https://issues.jenkins-ci.org/browse/JENKINS-35463)
45+
First release using
46+
[bouncycastle-api-plugin](https://wiki.jenkins-ci.org/display/JENKINS/Bouncy+Castle+API+Plugin)
47+
48+
### Version 1.10 (2016-03-03)
49+
50+
- [JENKINS-27152](https://issues.jenkins-ci.org/browse/JENKINS-27152) / [JENKINS-32624](https://issues.jenkins-ci.org/browse/JENKINS-32624)
51+
Use a standardized temporary directory compatible with Docker
52+
Pipeline.
53+
54+
### Version 1.9 (2015-12-07)
55+
56+
Changelog unrecorded.
57+
58+
### Version 1.8 (2015-08-07)
59+
60+
- Compatible with
61+
[Workflow](https://wiki.jenkins-ci.org/display/JENKINS/Workflow+Plugin) (issue
62+
[\#28689](https://issues.jenkins-ci.org/browse/JENKINS-28689))
63+
64+
### Version 1.7 (2015-06-02)
65+
66+
- Fixed a socket and thread leak ([issue
67+
\#27555](https://issues.jenkins-ci.org/browse/JENKINS-27555))
68+
69+
### Version 1.6 (2015-04-20)
70+
71+
- SSH agent socket service thread shouldn't keep JVM alive.
72+
73+
### Version 1.5 (2014-08-11)
74+
75+
- Add support for multiple credentials
76+
- Add support for parameterized credentials
77+
78+
### Version 1.4.2 (2014-08-11)
79+
80+
- Fix for
81+
[JENKINS-20276](https://issues.jenkins-ci.org/browse/JENKINS-20276)
82+
- **WARNING: Due to classpath conflicts, this plugin will not work if
83+
1.518 \<= Jenkins Version \< 1.533 (i.e. 1.518 broke it, 1.533 fixed
84+
it)**
85+
86+
### Version 1.4.1 (2013-11-08)
87+
88+
- Switch from f:select to c:select so that in-place addition of
89+
credentials is supported when the credentials plugin exposes such
90+
support
91+
- **WARNING: Due to classpath conflicts, this plugin will not work if
92+
1.518 \<= Jenkins Version \< 1.533 (i.e. 1.518 broke it, 1.533 fixed
93+
it)**
94+
95+
### Version 1.4 (2013-10-08)
96+
97+
- Minor improvement in exception handling
98+
- Minor improvement in fault reporting
99+
- Update JNR libraries
100+
- **WARNING: Due to classpath conflicts, this plugin will not work if
101+
1.518 \<= Jenkins Version \< 1.533 (i.e. 1.518 broke it, 1.533 fixed
102+
it)**
103+
104+
### Version 1.3 (2013-08-09)
105+
106+
- Set-up SSH Agent before SCM checkout, this way [GIT can use the ssh
107+
agent](https://issues.jenkins-ci.org/browse/JENKINS-12492).
108+
(Contributed by Patric Boos)
109+
- Upgrade to [SSH Credentials
110+
1.3](https://wiki.jenkins.io/display/JENKINS/SSH+Credentials+Plugin)
111+
112+
### Version 1.2 (2013-08-07)
113+
114+
- Upgrade to [Credentials plugin
115+
1.6](https://wiki.jenkins.io/display/JENKINS/Credentials+Plugin) and
116+
[SSH Credentials plugin
117+
1.0](https://wiki.jenkins.io/display/JENKINS/SSH+Credentials+Plugin).
118+
This now allows serving multiple private keys from the users home
119+
directory, e.g. \~/.ssh/id\_rsa, \~/.ssh/id\_dsa and
120+
\~/.ssh/identity
121+
122+
### Version 1.1 (2013-07-04)
123+
124+
- If BouncyCastleProvider is not registered, try to register it
125+
ourselves anyway... this should make installation and configuration
126+
even easier.
127+
128+
### Version 1.0 (2012-11-01)
129+
130+
- Using jnr-unixsocket have been able to remove the requirement on
131+
Apache Tomcat Native for unix nodes. Likely still require the Apache
132+
Tomcat Native for Windows nodes.
133+
134+
### Version 0.1 (2012-10-26)
135+
136+
- Initial release 

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<name>SSH Agent Plugin</name>
4141
<description>This plugin allows you to provide SSH credentials to builds via a ssh-agent in Jenkins</description>
42-
<url>http://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin</url>
42+
<url>https://github.com/jenkinsci/ssh-agent-plugin</url>
4343
<licenses>
4444
<license>
4545
<name>The MIT license</name>

0 commit comments

Comments
 (0)