GitHub

Integrating GitHub repository and issues with DeployHub Pro.

DeployHub supports GitHub in the following ways.

  1. A binary Repository for retrieving artifacts to deploy such as binaries or scripts.
  2. GitHub Issue Tracking for DeployHub Pro. A bridge connects a GitHub issue with a DeployHub Change Request.

GitHub as a Binary Repository

You can configure DeployHub to call out to a Git Repo to pull deployable artifacts (binaries, scripts, etc.) as part of your deployment. The process will check out your deployable artifacts based on commit, branch or tag specified. You will need to configure DeployHub with a file system DeployHub Repository that will pull the files need fro the deployment. You will also need to create a “Git Checkout” Procedure and Action.

Step 1 - Create a DeployHub File System Repository

DeployHub can use GitHub as a binary repository for retrieving deployable objects as part of the deployment process. To do this you will first need to define GitHub as a connected Repository Object from within DeployHub. This connection will be used by as part of the deployment process using a Procedure and a Action. For information on setting up File System as a binary repository see Connect Your Repositories.

Once you have completed this step, you are ready to create a new Procedure that performs the check out from the GitHub repository.

Step 2 - Create your GitHub Checkout Procedure for your Action

Procedures are called by Actions to execute deployment logic. A pre-defined DeployHub Procedure_ is available from the Ortelius Git Repo. This where you will find the most current version of this _Procedure_. For more information on creating _Procedures see Functions and Procedures.

From the Ortelius Git Repo, pull the file named GitCheckout.re

Once downloaded, you will need to Import it into DeployHub from the Func/Procs List View. Navigate to the List View by selecting the Func/Procs menu option on the left hand side of the DeployHub main panel. From the Func/Procs List view select the Import option. The Import will bring you to your operating system “file open” dialog box for selecting the GitCheckout.re file. Next, select your Domain and upload the Procedure into the DeployHub. You are now ready to create your Action.

Step 3 - Create your Action for the GitHub Checkout Procedure

Once you have imported your GitCheckout.re Procedure, you can define your Action. Navigate to the Actions list view from the Actions menu option on the left hand side of the DeployHub main panel. Use the +Add option to create a new Action for you Procedure. Name the new Action GitCheckAction (no spaces). See Customize Your Actions for more information on creating Actions.

Now we are going to customize this Action. On the right hand side, you will see a list of Functions and Procedures you can choose from. Navigate to your Domain to find the GitCheckOut Procedure. Drag it onto the area under Start. A pop-up dialog box will open for you to complete the following parameters:

GitCheckout Parameters

Field Value Description
Title Not Required Name of the step in your deployment workflow. Use “Git Checkout.”
Summary Not Required Enter a summary of this step.
Git Repo $GIT_URL This Variable represents the Git Repo containing the deployable artifacts. The value will be defined at the Component Level.
Git Commit $GIT_COMMIT This Variable represents the Git the commit, tag or branch to checkout. The value will be defined at the Component Level.
To Dir $GIT_DIR This Variable represents the directory to checkout into. The value will be defined at the Component Level. Use “.” for the default directory when assigning this value at the Component level.

At this point the Action is ready to be used by anyone with access (based on Domain and Group options). Note: Because this Action is reusable, no Component variables are defined. This is performed at the Component level.

Step 4 - Assign the GitCheckoutAction to your Component to be deployed

For each Component you will need to define the variable values for $GIT_URL, $GIT_COMMIT and $GIT_DIR that the GitCheckoutAction will use at the_Component_ level. The values will be passed to the GitCheckoutAction at deploy time. See Defining Components for more information.

**Step 5 - Set Your Component Attributes_**

The following variables must be added to the Attributes Section for all Components using the GitCheckoutAction Pre Action. The Attributes section can be found on the Component Dashboard. Use the +Add option in this section to add a row for the variable. You must use Save to commit the row to the table:

Variable Name Value Description
GIT_URL This Variable represents the Git Repo containing the deployable artifacts. The value will be defined at the Component Level.
GIT_COMMIT This Variable represents the Git the commit, tag or branch to checkout. The value will be defined at the Component Level.
GIT_DIR This Variable represents the directory to checkout into. The value will be defined at the Component Level. Use “.” for the default directory when assigning this value at the Component level.

GitHub Issues and DeployHub Pro Change Request

DeployHub Pro can reference the GitHub issues to track Change Request for Components and Applictions. This enables the GitHub issues to be viewed from a Component or Application using the DeployHub Pro Change Request section from the Component or Application. If you have a Release defined, these GitHub issues will be rolled up from the Component and Application to the Release.

For more information see Tracking Jira, Bugzilla and GitHub Issue.

Additional information: