Skip to content

GitHub-JenkinsDay/jenkins-deployment-api

This branch is 32 commits ahead of, 4 commits behind issc29/jenkins-deployment-api:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jun 5, 2018
1f07df8 · Jun 5, 2018

History

76 Commits
Apr 6, 2018
May 16, 2017
Jun 5, 2018
Nov 16, 2017
Nov 16, 2017
May 17, 2017

Repository files navigation

Jenkins - GitHub Deployment API

This repo demonstrates how to post back to the GitHub Deployment API from a Jenkins Pipeline. See the Jenkinsfile for the exact Pipeline.

Requirements

  1. Create a Multibranch Pipeline (or use GitHub Organization Folders) within Jenkins that references this repository.
  2. Install the HTTP Request Plugin and the Pipeline Utility Steps on Jenkins.
  3. Add a branch, make a modification, and create a Pull Request in GitHub.
  4. Run the pipeline jobs again and you should see the deployment recorded in the Pull Request

How it Works

The Jenkins pipeline has 2 stages: build and deploy.

  • Build Stage:
    • Maven command is run to build the project.
  • Deploy Stage
    • Creates a GitHub Deployment via API using the HTTP Request Plugin
    • Saves the deployment id of the deployment just created
    • Executes the deployment
    • Creates a GitHub Deployment Status based on the outcome of the deployment via API using the HTTP Request Plugin

License

The project is available as open source under the terms of the MIT License.

About

Jenkins - Deployment API Integration Example

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%