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
List java version: | |
/usr/libexec/java_home -V | |
Matching Java Virtual Machines (3): | |
11.0.6, x86_64: "AdoptOpenJDK (OpenJ9) 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11-openj9.jdk/Contents/Home | |
11.0.5, x86_64: "Java SE 11.0.5" /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home | |
1.8.0_231, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home | |
Choose version in ~/.bash_profile | |
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0_231) |
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 +x | |
# terminate a screen session | |
screen -S [session id # you want to kill] -X kill | |
screen -S [session id # you want to kill] -X quit | |
# start screen session | |
/usr/bin/screen -d -m -S android_emu ./emulator -avd ${DEVICE_NAME} -gpu host -wipe-data -no-boot-anim -no-audio -noaudio -netfast -timezone America/Los_Angeles >> emulator.log 2>&1 |
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
Run: | |
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 2376:2375 bobrik/socat TCP4-LISTEN:2375,fork,reuseaddr UNIX-CONNECT:/var/run/docker.sock | |
or | |
socat -d TCP-LISTEN:2376,range=127.0.0.1/32,reuseaddr,fork UNIX:/var/run/docker.sock | |
Using HTTP | |
https://docs.docker.com/engine/security/https/#connecting-to-the-secure-docker-port-using-curl | |
https://blog.couchbase.com/enabling-docker-remote-api-docker-machine-mac-osx/ |
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 { | |
stages { | |
stage("Build"){ | |
steps { | |
script { | |
currentBuild.displayName = "The name." | |
currentBuild.description = "The best description." | |
} | |
} | |
} |
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
// Check if key exists in map | |
def mymap = [name:"Gromit", likes:"cheese", id:1234] | |
def key = "likes" | |
if(mymap[key]) { | |
println mymap[key] | |
} | |
if(mymap.containsKey(key)) { | |
println mymap[key] |
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
The simple answer is, Agent is for declarative pipelines and node is for scripted pipelines. | |
In declarative pipelines the agent directive is used for specifying which agent/slave the job/task is to be executed on. This directive only allows you to specify where the task is to be executed, which agent, slave, label or docker image. | |
On the other hand, in scripted pipelines the node step can be used for executing a script/step on a specific agent, label, slave. The node step optionally takes the agent or label name and then a closure with code that is to be executed on that node. | |
declarative and scripted pipelines (edit based on the comment): | |
* declarative pipelines is a new extension of the pipeline DSL (it is basically a pipeline script with only one step, a pipeline step with arguments (called directives), these directives should follow a specific syntax. The point of this new format is that it is more strict and therefore should be easier for those new to pipelines, allow for graphical editing and much m |
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
https://www.worldtimebuddy.com/?pl=1&lid=100,5392263,1819729,30&h=100 | |
https://www.gardenista.com/posts/everything-you-need-to-know-about-zz-plants-zamioculcas-zamiifolia/ | |
https://cleanvehiclerebate.org/eng/pre-post-purchase/1999 | |
https://shop.thatgrin.com/slipstreamtm-no-drill-no-adhesive-front-license-plate-mounting-bracket-for-tesla-model-3.html | |
https://www.dmv.ca.gov/portal/dmv/detail/vr/decal | |
https://www.rapidtables.com/web/color/html-color-codes.html | |
https://myhellorewards.redlion.com/MyStays | |
https://rtyley.github.io/bfg-repo-cleaner/ | |
https://ibotpeaches.github.io/Apktool/ | |
https://raw.githubusercontent.com/apkudo/adbusbini/master/adb_usb.ini |
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
https://plugins.jenkins.io/convert-to-pipeline | |
https://github.com/KostyaSha/github-integration-plugin | |
https://plugins.jenkins.io/kubernetes | |
http://afonsof.com/jenkins-material-theme/ |
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
# https://github.com/jenkinsci/docker/blob/master/README.md | |
docker run --name jenkins -d -p 8080:8080 -p 50000:50000 -u $(id -u ${USER}):$(id -g ${USER}) \ | |
-v /Users/home/jenkins_home:/var/jenkins_home jenkins/jenkins:lts-jdk11 |
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 +x | |
* Run the container | |
docker run -it -e VAR=1 ubuntu_bash -d ashok/pyashokproj /bin/bash | |
* To start an existing container which is stopped | |
docker start <container-name/ID> | |
* To stop a running container | |
docker stop <container-name/ID> |