Skip to content

Instantly share code, notes, and snippets.

@sursir
Created November 22, 2017 08:11
Show Gist options
  • Save sursir/59301e4ab98145a76fa9bd1415d03b5c to your computer and use it in GitHub Desktop.
Save sursir/59301e4ab98145a76fa9bd1415d03b5c to your computer and use it in GitHub Desktop.
Jenkins
java
java -version
java -jar jenkins.war --httpPort=8080
# get jenkin-cli
wget http://localhost:8080/jnlpJars/jenkins-cli.jar
# jenkin-cli install plugin
java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin checkstyle cloverphp crap4j dry htmlpublisher jdepend plot pmd violations warnings xunit --username=yang --password=lljkl
# safe restart
java -jar jenkins-cli.jar -s http://localhost:8080 safe-restart --username=yang --password=lljkl
# add template &&
# reload config
curl -L https://raw.githubusercontent.com/sebastianbergmann/php-jenkins-template/master/config.xml | \
java -jar jenkins-cli.jar -s http://localhost:8080 create-job php-template --username=yang --password=lljkl
java -jar jenkins-cli.jar -s http://localhost:8080 reload-configuration --username=yang --password=lljkl
@aipages
Copy link

aipages commented Nov 24, 2017

可以试一下更好用的开源 flowci,简单易用,支持 docker。https://github.com/FlowCI/docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment