Skip to content

Commit

Permalink
Working with Credentials API
Browse files Browse the repository at this point in the history
  • Loading branch information
vamshikr committed Apr 8, 2018
1 parent 31521bb commit 1ac6e61
Show file tree
Hide file tree
Showing 6 changed files with 323 additions and 218 deletions.
36 changes: 22 additions & 14 deletions README.adoc
Expand Up @@ -31,8 +31,6 @@ Jenkins plugin store, or using a .hpi file containing the plugin.
The SWAMP Jenking Plugin can be installed directly from Jenkins using the on-line
plugins available within Jenkins using the following steps:

NOTE: Not available yet.

. Go to your Jenkins URL in a web browser
. Click _Manage Jenkins_ -> _Manage Plugins_
. Click the _Available_ tab
Expand All @@ -43,6 +41,7 @@ NOTE: Not available yet.

== Update the Plugin
To update the SWAMP Plugin

. Go to your Jenkins URL in a web browser
. Click _Manage Jenkins_ -> _Manage Plugins_
. Click the _Updates_ tab
Expand All @@ -55,8 +54,6 @@ To update the SWAMP Plugin
The SWAMP Jenking Plugin can be installed directly from Jenkins using the on-line
plugins available within Jenkins using the following steps:

NOTE: Not available yet.

. Go to your Jenkins URL in a web browser
. Click _Manage Jenkins_ -> _Manage Plugins_
. Click the _Available_ tab
Expand All @@ -80,7 +77,7 @@ SWAMP.hpi file using the following steps:
. Click the _Go back to the top page_ link

== Configure the SWAMP Jenkins Plugin
The SWAMP Jenkins Plugin must be configured before use.
The SWAMP Jenkins Plugin must be configured before use. Starting version `1.1.3`, SWAMP plugin uses https://wiki.jenkins.io/display/JENKINS/Credentials+Plugin[Credentials API].
This configuration is modified on the following web interface:

. Go to your Jenkins URL in a web browser
Expand All @@ -91,23 +88,34 @@ This configuration is modified on the following web interface:
[width="80%",cols="1,3",options="header"]
|==========================
|Parameter | Description
|Swamp URL a| URL of SWAMP web site.
The default is the SWAMP public instance at https://www.mir-swamp.org.
If you are using SWAMP-in-a-Box, contact your administrator for the URL to use.
2+|*Credentials*
|Swamp Username a| Your username to log into the SWAMP
|Swamp Credentials| Select the SWAMP credentials from the drop-down list.

If SWAMP credentials are not in the list, _Add Credentials_ by clicking on *Add* button and choosing *Jenkins (Jenkins Credentials Provider)*.

In the *Add Credentials* page:

1. Select _Username with password_ from *Kind* drop-down list.

2. Enter SWAMP username and password in the *Username* and *Password* text boxes.

3. In the *Description* textbox, enter *SWAMP*.

4. Leave the *ID* textbox empty.

5. Save the credentials by clicking on the *Add* button.

NOTE: If you use _third party credential_ such as _github_ to log into SWAMP then, create and use a SWAMP https://www.mir-swamp.org/#my-account/passwords[Application Password].

NOTE: Third party credential such as github are not supported Create and use a SWAMP Application Password instead.
|Swamp Password | Your password to log into the SWAMP
|SWAMP URL a| URL of SWAMP web site.
The default is the SWAMP public instance at https://swa-csaweb-pd-01.mir-swamp.org. +
If you are using SWAMP-in-a-Box, contact your administrator for the URL to use.
|Test Connection Button | Use this button to test your credentials and URL
2+|*Global Project Settings*
|Default Project | The default project to be used for each upload
Can be modified in build settings
2+|*Miscellaneous Options*
|Verbose Mode | Provide extra output for status updates and error checking
|Run even if build fails? | If checked, the package will be uploaded and assessed even if the build fails
|Run Assessments in Background | If selected, you will not be able to view the results of the assessments in Jenkins. +
Use this option if you use a SWAMP viewer.
|==========================

== Use the SWAMP Jenkins Plugin
Expand Down
41 changes: 24 additions & 17 deletions pom.xml
Expand Up @@ -79,26 +79,33 @@
<version>2.1.16</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-validator/commons-validator -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<scope>runtime</scope>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.6</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.2</version>
<scope>runtime</scope>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.apache.httpcomponents</groupId> -->
<!-- <artifactId>httpclient</artifactId> -->
<!-- <version>4.5.2</version> -->
<!-- <scope>runtime</scope> -->
<!-- </dependency> -->

<!-- <dependency> -->
<!-- <groupId>org.apache.httpcomponents</groupId> -->
<!-- <artifactId>httpcore</artifactId> -->
<!-- <version>4.4.4</version> -->
<!-- <scope>runtime</scope> -->
<!-- </dependency> -->

<!-- <dependency> -->
<!-- <groupId>org.apache.httpcomponents</groupId> -->
<!-- <artifactId>httpmime</artifactId> -->
<!-- <version>4.5.2</version> -->
<!-- <scope>runtime</scope> -->
<!-- </dependency> -->

<dependency>
<groupId>org.continuousassurance.swamp</groupId>
Expand Down

0 comments on commit 1ac6e61

Please sign in to comment.