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 | |
## Checkout | |
git checkout --orphan latest_branch | |
## Add all the files | |
git add -A | |
## Commit the changes | |
git commit -am "Initial" |
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
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( | |
com.cloudbees.plugins.credentials.Credentials.class, | |
Jenkins.instance, | |
null, | |
null | |
) | |
for(c in creds) { | |
println(String.format("%s --> %s: %s",c, c.id, c.description)) | |
// if(c instanceof com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey){ |
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
import hudson.FilePath; | |
// Initialize dryRun parameter to TRUE if not given as script parameter | |
dryRun = true; | |
if( dryRun == true ) { | |
println "** Execute a dryRun - no files will ever be deleted **"; | |
} | |
// shortcut to Jenkins instance |
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 this in the jenkins_home/jobs directory | |
for file in */ ; do echo "Processing $file...." && cd "${file}" && rm -Rf last* && rm -Rf builds/last* && cd ..; done^C |
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 the calico-node container is running | |
docker ps | grep calico | |
#The **calicoctl** command allows to check the status of the network workloads. | |
#Check the status of Calico nodes | |
calicoctl node status | |
# Show the configured network subnet for containers | |
calicoctl get ippool -o wide |
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
xmllint --xpath '//views' ../../jenkins-ahonline-master/config.xml |
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<String> jenkinsPlugins = new ArrayList<String>(Jenkins.instance.pluginManager.plugins); | |
jenkinsPlugins.sort { it.shortName } | |
.each { plugin -> | |
println (" - ${plugin.shortName}:${plugin.version}") | |
} |