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
| Some Jenkinsfile examples |
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
| #!groovy | |
| import groovy.json.JsonOutput | |
| import groovy.json.JsonSlurper | |
| def label = "mypod-${UUID.randomUUID().toString()}" | |
| podTemplate(label: label, yaml: """ | |
| spec: | |
| containers: | |
| - name: mvn | |
| image: maven:3.3.9-jdk-8-alpine |
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
| pipeline { | |
| agent any | |
| parameters { | |
| string(name: 'environment', defaultValue: 'default', description: 'Workspace/environment file to use for deployment') | |
| string(name: 'version', defaultValue: '', description: 'Version variable to pass to Terraform') | |
| booleanParam(name: 'autoApprove', defaultValue: false, description: 'Automatically run apply after generating plan?') | |
| } | |
| environment { |
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
| #!/bin/bash | |
| # Merges the master branch into all other branches | |
| # | |
| # Process: | |
| # | |
| # - Save the name of the current branch | |
| # - If the current branch is not master then checkout master. | |
| # - Pull the latest changes for master from its upstream branch. | |
| # - Loop over each local branch. |
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
| #!/bin/bash | |
| set -e | |
| reset=$(tput sgr0) | |
| green=$(tput setaf 76) | |
| blue=$(tput setaf 25) | |
| red=$(tput setaf 1) | |
| info() { |
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
| # coding=utf-8 | |
| import copy | |
| op_method = ['+', '-', '*', '/'] | |
| def copy_arr(old, e): | |
| new_buf = copy.copy(old) | |
| new_buf.append(e) | |
| return new_buf |
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
| #!/bin/bash | |
| set -e | |
| # Building LLVM on OSX CMake setup script | |
| # | |
| # Required: | |
| # - clang by Xcode6 or later | |
| # - cmake | |
| # - ninja | |
| # |