Issue Management

Codenvy Factories can be integrated with nearly any issue mangement system. However, we have developed two plug-ins that allow completely automated Factory creation and update based on changes to Atlassian JIRA or Microsoft VSTS issue management.

Because configuring this integration requires system-level property settings it can only be used by customer with on-premises Codenvy.

Codenvy Issue Management Integrations

Codenvy Plug-in for Atlassian JIRA

The Codenvy plug-in for Atlassian JIRA allows anyone to jump directly from an issue in JIRA to a custom, isolated workspace designed to let them edit, built, debug and review the issue. This video shows the agile flow from JIRA to Codenvy.

The plug-in for JIRA consists of three parts:

  1. Issue event listener: Automatically generates Codenvy Factories for the develop and review issue fields when an issue in a Factory-enabled project is created.
  2. Custom issue fields: Display the links to the develop and review workspaces in Codenvy.
  3. Plug-in administration page: Defines the location of the associated Codenvy instance, username and password.

The Codenvy agile workflow with Atlassian JIRA requires:

  • Codenvy 5.0+.
  • Atlassian JIRA issue management system 7.x.
  • Codenvy Plug-in for Atlassian JIRA 1.0.5+.
  • GitHub or BitBucket Server repo. jira-github-jenkins-integration.png

Installing the Plug-In for JIRA

The Codenvy plug-in for JIRA is available from the Atlassian Marketplace.

Configuring the Plug-In for JIRA

### Defining the Parent Factory
1. In Codenvy create a new generic user account that will house the factories created by the plug-in for JIRA (e.g. jira-user@some-email.com). 2. Each project in JIRA that you want to be Factory-enabled must have a “parent Factory” configured in Codenvy. The parent Factory defines the workspace needed by developers working with the project and must be named identically to the Key of the JIRA Project it is associated with (e.g. if JIRA Key is “SPRING” then the parent Factory must be called “spring”). The “parent Factory” name should be always LOWERCASE.

Connecting Codenvy to JIRA

  1. Log into your JIRA instance as an admin.
  2. Navigate to JIRA Administration > Add-Ons.
  3. Click on Codenvy Administration at the bottom of the left-hand nav.
  4. Enter the URL to your Codenvy instance, as well as the Codenvy username and password you created in the previous section.
  5. Save your changes.

Defining Factory-Enabled Projects

  1. Log into your JIRA instance as an admin.
  2. Navigate to JIRA Administration > Issues.
  3. Choose “Custom fields” from the “Fields” section.
  4. Add a new custom field by clicking the button on the right.
  5. In the dialog box click the “Advanced” option on the left.
  6. Choose “Codenvy Develop Field” and click “Next”.
  7. Type in your custom field name (e.g. “Develop”) and click “Create”.
  8. Associate the field to the JIRA projects you want to be Factory-enabled and click “Update”.
  9. Create a second custom field.
  10. Choose “Codenvy Review Field” and click “Next”.
  11. Type in your custom field name (e.g. “Review”) and click “Create”.
  12. Associate the field to the JIRA projects you want to be Factory-enabled and click “Update”.

Testing

At this point Codenvy will automatically generate custom develop and review workspaces for every issues that’s created based on the parent Factory associated with the JIRA Project.

Log into JIRA and choose one of the project types that you have Factory-enabled. Create a new issue. There will be two new labels “Develop” and “Review” each with a link that will load a Codenvy workspace.

Using the Plug-In for JIRA

When a developer is ready to start work on an issue they click the Develop link. They are brought into a developer workspace that is isolated to them and includes project sources and the build / run / debug environments needed for the project. The definition of the project’s parent Factory defines pre- and post-load behaviors. webhook-vcs-integration-flow.png The git webhooks ensure that as the repository changes the JIRA issue Factory is kept up to date. For example, if a branch associated with the Factory is merged then the Factory will be updated to point to the commitID on the branch that was merged-to.

Plug-In for JIRA User Data Usage and Privacy

The plug-in requires the URL of Codenvy as well as a Codenvy user’s username and password. The plug-in acts exclusively on the “Issue” object in JIRA. No data from that object is stored.

If you have security or privacy questions regarding this plug-in please contact us: https://codenvy.com/contact/questions/

Codenvy Extension for Microsoft Visual Studio Team Services

The Codenvy extension for Microsoft Visual Studio Team Services (VSTS) allows anyone to jump directly from an work item in VSTS to a custom, isolated workspace designed to let them edit, build, debug and review the code. This video shows the agile flow from Microsoft VSTS to Codenvy.

The plug-in processes events from VSTS issue management: 1. Work Item created events: Triggers the creation of a work item-specific Codenvy Factory and adds it to the “Develop” and “Review” fields in the Codenvy section of the work item detail card. 2. Git repo events: Updates the branch and commitID information for the Codenvy Factory based on changes in the git repo.

The Codenvy agile workflow with Microsoft Visual Studio Team Services requires: - A Codenvy installation with the VCS Factory Plug-In installed. - A Microsoft Visual Studio Team Services installation with a git-based repo. - The Codenvy Agile Plugin for VSTS microsoft-vsts-integration.png

Installing the Extension for VSTS

The Codenvy extension for Microsoft VSTS is available from the Visual Studio Marketplace.

Configuring the Extension for VSTS

### Creating the Codenvy User for VSTS
In Codenvy create a new generic user account that will house the factories created by the extension for Microsoft VSTS (e.g. vsts-user@some-email.com).

Setting VSTS Webhooks

  1. On VSTS go to:
https://{your-account}.visualstudio.com/{your-collection}/{your-project-name}/_admin/_servicehooks\
  1. Configure a new webhook for ‘Work item created’ events.
  2. Set the webhook to http://your-codenvy-url/api/github-webhook
  3. Configure a new webhook for ‘Pull request updated’ events.
  4. Set the webhook to http://your-codenvy-url/api/github-webhook

Setting Properties in Codenvy

  1. In /home/codenvy/credentials.properties Include the Codenvy User for VSTS username and password created above.
username=somebody@somemail.com
password=somepw\
  1. In /home/codenvy/vsts-webhooks.properties For each VSTS webhook created include: [webhook-name]=[webhook-type],[api-version],[project-api-url],[username],[password]
# [webhook-name]=[webhook-type],[host],[account],[collection],[api-version],[username],[password]
webhook1=work-item-created,visualstudio,myaccount,DefaultCollection,2.2-preview.1,some-user,some-pw\

VSTS Credentials

The VSTS credentials used must be secondary credentials. Read more about secondary credentials in the Microsoft documentation.

Defining the Parent Factory

Each project in JIRA that you want to be Factory-enabled must have a “Parent Factory” configured in Codenvy. 1. Create the Parent Factory with the Codenvy VSTS user created above. 2. Name the Parent Factory identically to the Team Project in VSTS that it will be associated with.

Testing

Test that Codenvy automatically generates custom develop and review workspaces for every work item that’s created based on the parent Factory associated with the VSTS Project.

Log into Microsoft VSTS and choose one of the project types that you have Factory-enabled. Create a new work item and open its detail card. There will be a new section called “Codenvy” with a link for Developer Workspace and one for Review Workspace.

Using the Codenvy Extension for Microsoft VSTS

When a developer is ready to start work on a work item they click the Develop link. They are brought into a developer workspace that is isolated to them and includes project sources and the build / run / debug environments needed for the project. The definition of the project’s parent Factory defines pre- and post-load behaviors.

webhook-vcs-integration-flow.png

The git webhooks ensure that as the repository changes the Microsoft VSTS work item Factory is kept up to date. For example, if a branch associated with the Factory is merged then the Factory will be updated to point to the commitID on the branch that was merged-to.