Last active
          December 29, 2019 15:17 
        
      - 
      
- 
        Save chinhnguyen/2a232e4b319526a4ef533ddccdea8d57 to your computer and use it in GitHub Desktop. 
    Programmatically create a version/release on JIRA upon creation of a SemVer tag on git
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | image: node:12 | |
| create_jira_version: | |
| stage: post-deploy | |
| only: | |
| - tags | |
| - /^(\d+\.)?(\d+\.)?(\*|\d+)$/ | |
| variables: | |
| VERSION: $CI_BUILD_TAG | |
| USER: $JIRA_USER:$JIRA_TOKEN | |
| script: >- | |
| curl --request POST | |
| --url 'https://<yourdomain>.atlassian.net/rest/api/3/version' | |
| --user $USER | |
| --header 'Accept: application/json' | |
| --header 'Content-Type: application/json' | |
| --data '{"name": "'"$VERSION"'", "projectId": <your project id>}' | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment