This file contains 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
you must allow jenkins to tun the script in /etc/sudoers. | |
jenkins ALL = NOPASSWD: /path/to/script |
This file contains 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://medium.com/@ssmak/how-to-enable-docker-remote-api-on-docker-host-7b73bd3278c6 | |
ubuntu@awt02-devops:~$ sudo vi /lib/systemd/system/docker.service | |
#add this -H=tcp://0.0.0.0:2375 to the next line | |
ExecStart=/usr/bin/dockerd -H=fd:// -H=tcp://0.0.0.0:2375 | |
ubuntu@awt02-devops:~$ sudo systemctl daemon-reload | |
ubuntu@awt02-devops:~$ sudo service docker restart | |
ubuntu@awt02-devops:~$ curl http://localhost:2375/images/json | |
[] |
This file contains 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
//task to update file content | |
task updateBuildNum { | |
def productVersion="1.2.3.0" | |
def buildNum="1.2.3.4521" | |
String contents = new File( '/tmp/dir/BuildNum.plist' ).getText( 'UTF-8' ) | |
contents = contents.replaceAll( 'version = "0.0.0.0"', 'version = '+'"'+"${productVersion}"+'"') | |
contents = contents.replaceAll( 'buildNum = "0.0.0.0"', 'buildNum = '+'"'+"${buildNum}"+'"') | |
new File( 'build/BuildNum.plist' ).write( contents, 'UTF-8' ) | |
} |
This file contains 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
# Otherwise connection errores will displayed, after doing up you can edit and add the keys | |
# How to generate an existing box to share | |
vagrant package --output mynewbox.box | |
# Add shared box, you must specified the file full path | |
vagrant box add my-box file:///f:/courses/boxes/newbox.box | |
# In order to verify that box was added, you could run | |
vagrant box list | |
# this is example result of the box added manually |