Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
162df55
First implementation of connecting to the Connect API websocket service
Aug 23, 2017
64f91f0
https://github.ibm.com/org-ids/otc-integration-issues/issues/958
ejodet Aug 23, 2017
5690d94
Fix get sync token method
Aug 23, 2017
dd62006
https://github.ibm.com/org-ids/otc-integration-issues/issues/961
ejodet Aug 24, 2017
c041e1b
https://github.ibm.com/org-ids/otc-integration-issues/issues/978
ejodet Aug 25, 2017
f644134
Now posts jobs through Sync API, Registers integration to Sync Store
Sep 7, 2017
059738e
https://github.ibm.com/org-ids/otc-integration-issues/issues/1013
ejodet Sep 12, 2017
9f5d2e1
Continuous Release Phase 1
Oct 4, 2017
6b73235
Merge branch '948_cloud_connect' of https://github.com/aberkIBM/ibm-c…
Oct 4, 2017
4b21682
Add test connection button and begin listening to pipelines
Oct 17, 2017
f686186
Handle Job Requests with all param types
Oct 18, 2017
055f383
https://github.ibm.com/org-ids/otc-integration-issues/issues/1113
ejodet Oct 20, 2017
328e126
https://github.ibm.com/org-ids/otc-integration-issues/issues/1114
ejodet Oct 25, 2017
b07357c
Update Integrations with Server URl
Dec 1, 2017
f309006
Merge branch '948_cloud_connect' of https://github.com/aberkIBM/ibm-c…
Dec 1, 2017
86fc9fe
https://github.ibm.com/org-ids/otc-integration-issues/issues/1152
ejodet Dec 11, 2017
beeb8ea
https://github.ibm.com/org-ids/otc-integration-issues/issues/1172
ejodet Dec 12, 2017
1b54207
Protect against re-use of sync ID
Jan 15, 2018
f730042
Remove debug code
Jan 15, 2018
1af8cc2
https://github.ibm.com/org-ids/otc-integration-issues/issues/1190
ejodet Jan 16, 2018
fa1b0aa
Get parameters for Jenkins pipelines. Start getting their executions.
Jan 31, 2018
0c5d819
Upload all exec data and include DRA
Feb 5, 2018
4c1ec4f
Enhanced Pipeline Executions: Status, Pauses, DRA, SCM
Feb 6, 2018
54293a3
Include job name on pipeline status info
Feb 6, 2018
ce3866a
Refactored to New Plugin
Feb 27, 2018
91b0d85
Forgot to commit the pom
Feb 27, 2018
8a8270f
Addressed issue where there are no build steps when job is triggered …
Feb 27, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ buildNumber.properties

## Plugin-specific files:

# VS Code
.vscode

# IntelliJ
/out/

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6c754e433587ea29f749e3d89e359d68
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c200e4c488c2c195d7e9419426963ee0d3f50e3a
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.cloud.urbancode</groupId>
<artifactId>cloud-connect-java</artifactId>
<version>1.0.920563</version>
<dependencies>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-json4j</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.socket</groupId>
<artifactId>socket.io-client</artifactId>
<version>0.7.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
02ccf932b56ed69bb01318c1d83520f9
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
25c902c0b385cd671c01d25a197e36c4ab6111b4
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>uc-cloud-connect-java</groupId>
<artifactId>cloud-connect-java</artifactId>
<versioning>
<versions>
<version>1.0.920563</version>
</versions>
<lastUpdated>20150821193926</lastUpdated>
</versioning>
</metadata>
102 changes: 71 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.devops</groupId>
<artifactId>ibm-cloud-devops</artifactId>
<version>1.1.7-SNAPSHOT</version>
<artifactId>ibm-continuous-release</artifactId>
<version>1.1.0</version>
<packaging>hpi</packaging>
<name>IBM Cloud DevOps</name>
<name>IBM Continuous Release</name>
<description>This plugin can be used to integrate your Jenkins pipelines and jobs with IBM DevOps Insights offering. The IBM DevOps Insights offering tracks your deployment risk based on the data that you publish to it. It provides Gates so that you can stop builds from getting deployed if the Gate policy is not met. The offering also provides analysis of your Git repo. For example, it can provide trends for large commits, error prone files, and team dynamics. Very soon, the offering will provide more trends, e.g., Deploy Frequency, Build Frequency, Unit Tests and Code Coverage and Function Verification Tests for builds that have deployed to production or other environments.</description>
<url>https://wiki.jenkins-ci.org/display/JENKINS/IBM+Cloud+DevOps+Plugin</url>

Expand Down Expand Up @@ -61,6 +61,7 @@
<id>maven.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/snapshots/</url>
</snapshotRepository>

</distributionManagement>

<licenses>
Expand All @@ -72,29 +73,9 @@

<developers>
<developer>
<id>xunrongl</id>
<name>Xunrong Li</name>
<email>xunrongli@us.ibm.com</email>
</developer>
<developer>
<id>aggarwav</id>
<name>Vijay Aggarwal</name>
<email>aggarwav@us.ibm.com</email>
</developer>
<developer>
<id>imvijay2007</id>
<name>Vijay Jegaselvan</name>
<email>vjegase@us.ibm.com</email>
</developer>
<developer>
<id>ejodet</id>
<name>Eric Jodet</name>
<email>eric_jodet@fr.ibm.com</email>
</developer>
<developer>
<id>patjoy</id>
<name>Patrick Joy</name>
<email>patrick.joy1@ibm.com</email>
<id>aberk</id>
<name>Andy Berkebile</name>
<email>aberkeb1@us.ibm.com</email>
</developer>
</developers>

Expand All @@ -105,17 +86,17 @@
</scm>

<repositories>
<repository>
<id>Local repository</id>
<url>file://${basedir}/lib</url>
</repository>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
<!-- A CF Java client shaded library is pre-installed in a local repository
to allow building the project in a single 'mvn clean install'.
See README.md for more details. -->
<repository>
<id>Local repository</id>
<url>file://${basedir}/lib</url>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
Expand Down Expand Up @@ -144,6 +125,11 @@
<artifactId>httpcore</artifactId>
<version>4.4.5</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>unique-id</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
Expand Down Expand Up @@ -189,5 +175,59 @@
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>uc-cloud-connect-java</groupId>
<artifactId>cloud-connect-java</artifactId>
<version>1.0.920563</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>6.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>io.socket</groupId>
<artifactId>socket.io-client</artifactId>
<version>0.8.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.11.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>git</artifactId>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.22</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security</artifactId>
<version>1.0.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.ibm.devops</groupId>
<artifactId>ibm-cloud-devops</artifactId>
<version>1.1.18</version>
<optional>true</optional>
</dependency>
</dependencies>
</project>
</project>
Binary file removed screenshots/PostBuild-WebHookNotification.png
Binary file not shown.
Binary file removed screenshots/Upload-Test-Result.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
/**
* (c) Copyright IBM Corporation 2018.
* This is licensed under the following license.
* The Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/

package com.ibm.devops.connect.CRPipeline;

import org.apache.http.impl.client.DefaultHttpClient;

import hudson.AbortException;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.Launcher;
import hudson.model.AbstractProject;
import hudson.model.Descriptor.FormException;
import hudson.remoting.VirtualChannel;
import hudson.model.Hudson;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.Builder;
import hudson.tasks.BuildStepDescriptor;
import hudson.util.Secret;

import jenkins.tasks.SimpleBuildStep;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;

import net.sf.json.JSONObject;

import org.jenkinsci.remoting.RoleChecker;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;

import java.util.Map;

import com.ibm.devops.connect.Status.CrAction;

public class ContinuousReleaseProperties extends Builder implements SimpleBuildStep {

private Map<String, String> properties;

/**
* Constructor used for data-binding fields from the corresponding
* config.jelly
*
* @param siteName
* The profile name of the UrbanDeploy site
* @param component
* The object holding the Create Version Block structure
* @param deploy
* The object holding the Deploy Block structure
*/
@DataBoundConstructor
public ContinuousReleaseProperties(
Map<String, String> properties) {
this.properties = properties;
}

/*
* Accessors and mutators required for data-binding access
*/

public Map<String, String> getProperties() {
return this.properties;
}

/**
* {@inheritDoc}
*
* @param build
* @param launcher
* @param listener
* @return A boolean to represent if the build can continue
* @throws InterruptedException
* @throws java.io.IOException
* {@inheritDoc}
* @see hudson.tasks.BuildStep#perform(hudson.model.Build, hudson.Launcher,
* hudson.model.TaskListener)
*/
@Override
public void perform(final Run<?, ?> build, FilePath workspace, Launcher launcher, final TaskListener listener)
throws AbortException, InterruptedException, IOException {
CrAction action = build.getAction(CrAction.class);

if(action == null) {
action = new CrAction();
build.addAction(action);
}

if (properties != null) {
action.updateCrProperties(properties);
}
}

/**
* This class holds the metadata for the Publisher and allows it's data
* fields to persist
*
*/
@Extension
public static class ContinuousReleasePropertiesDescriptor extends BuildStepDescriptor<Builder> {

public ContinuousReleasePropertiesDescriptor() {
load();
}

/**
* Return the location of the help document for this builder.
* <p/>
* {@inheritDoc}
*
* @return {@inheritDoc}
* @see hudson.model.Descriptor#getHelpFile()
*/
@Override
public String getHelpFile() {
return "/plugin/ibm-ucdeploy-build-steps/publish.html";
}

/**
* Bind data fields to user defined values {@inheritDoc}
*
* @param req
* {@inheritDoc}
* @param formData
* {@inheritDoc}
* @return {@inheritDoc}
* @see hudson.model.Descriptor#configure(org.kohsuke.stapler.StaplerRequest)
*/
@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {
req.bindJSON(this, formData);
save();
return super.configure(req, formData);
}

/**
* {@inheritDoc}
*
* @return {@inheritDoc}
*/
@Override
public String getDisplayName() {
return "Pass Properties to Continuous Release Version";
}

/**
* {@inheritDoc}
*
* @param jobType
* {@inheritDoc}
* @return {@inheritDoc}
*/
@Override
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
return true;
}
}
}
Loading