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 | |
stages { | |
stage('Build') { | |
steps { | |
echo 'Hello from Build' | |
} | |
} | |
stage('Test') { | |
steps { |
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
// A Declarative Pipeline is defined within a 'pipeline' block. | |
pipeline { | |
// agent defines where the pipeline will run. | |
agent { | |
// This also could have been 'agent any' - that has the same meaning. | |
label "" | |
// Other possible built-in agent types are 'agent none', for not running the | |
// top-level on any agent (which results in you needing to specify agents on | |
// each stage and do explicit checkouts of scm in those stages), 'docker', |
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
node { | |
stage('Jira-Create-Task') { | |
withEnv(['JIRA_SITE=local']) { | |
def testIssue = [fields: [ project: [key: 'AUG2'], | |
summary: 'New JIRA Created from Jenkins.', | |
description: 'New JIRA Created from Jenkins.', | |
issuetype: [name: 'Task']]] |
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
node { | |
stage('Jira-Create-Task') { | |
withEnv(['JIRA_SITE=local']) { | |
def testIssue = [fields: [ project: [key: 'AUG2'], | |
summary: 'New JIRA Created from Jenkins.', | |
description: 'New JIRA Created from Jenkins.', | |
issuetype: [name: 'Task']]] |
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
// assume this is some list of things you're going to do something with | |
def someList | |
def parallelBranches = someList.collectEntries { n -> | |
[(n): { | |
throttle('category') { | |
node('some-node') { | |
// do some things with n | |
} | |
} | |
}] |
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
node (){ | |
stage ("prepare"){ | |
["1", "2", "3"].each { | |
println "Item: $it" | |
// Write a text file there. | |
dir ("output"){ | |
writeFile file: "${it}-test.txt", text: "$it",encoding: "UTF-8" | |
} |
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
1. Setup a project | |
2. Add groovy SDK support: | |
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA | |
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl | |
- this will give you the .gdsl file - download this to the src folder of your project. | |
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root |
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
java -jar yourApp.jar [JVM_OPTIONS] | |
For local host access only JVM_OPTIONS are: | |
-Dcom.sun.management.jmxremote | |
-Dcom.sun.management.jmxremote.port=9010 | |
-Dcom.sun.management.jmxremote.host=127.0.0.1 | |
-Dcom.sun.management.jmxremote.local.only=true | |
-Dcom.sun.management.jmxremote.authenticate=false | |
-Dcom.sun.management.jmxremote.ssl=false |
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
aws elb describe-load-balancers | |
kubectl config view | |
kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/ingress-nginx/v1.6.0.yaml | |
kubectl --namespace kube-ingress get all | |
aws elb describe-load-balancers | |
#This one wont work for me |
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
git clone https://github.com/vfarcic/k8s-specs.git | |
cd k8s-specs | |
git pull | |
open "https://console.aws.amazon.com/iam/home#/security_credential" | |
export AWS_ACCESS_KEY_ID=[...] |
OlderNewer