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
MAX_BUILDS = 10 // max builds to keep | |
def jobs = Jenkins.instance.items; | |
for (job in jobs) { | |
println "Job: " + job.name | |
try { | |
if(job instanceof jenkins.branch.MultiBranchProject) { | |
println "Multibranch" | |
job = job.getJob("master") |
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 q = Jenkins.instance.queue | |
q.items.each { | |
q.cancel(it.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
cadvisor_deb_version=$(awk '{gsub(/%2B|%2b/,"+")}1' <<< `wget -q -O- "http://http.us.debian.org/debian/pool/main/c/cadvisor/" | grep "amd64.deb" | cut -d'_' -f 2`) | |
cadvisor_deb_checksum=$(curl -s -L "http://http.us.debian.org/debian/pool/main/c/cadvisor/cadvisor_${cadvisor_deb_version}_amd64.deb" | tee cadvisor_${cadvisor_deb_version}_amd64.deb | sha256sum | cut -d' ' -f 1) | |
echo "cadvisor_deb_version: ${cadvisor_deb_version}" | |
echo "cadvisor_deb_checksum: ${cadvisor_deb_checksum}" | |
sed -i "/PV=/c\PV=\"$cadvisor_deb_version\"" industrial-core/recipes-core/cadvisor/cadvisor.bb | |
sed -i "/SRC_URI\[sha256sum\]/c\SRC_URI[sha256sum] = \"$cadvisor_deb_checksum\"" industrial-core/recipes-core/cadvisor/cadvisor.bb |
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
sudo cat << 'EOT' >> /etc/motd | |
____ _ _ ___ ____ _____ | |
/ ___| | | |/ _ \/ ___|_ _| | |
| | _| |_| | | | \___ \ | | | |
| |_| | _ | |_| |___) || | | |
\____|_| |_|\___/|____/ |_| | |
EOT |
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 | |
checkdate=`date --date "yesterday 00:00" +%s000` | |
curl -u ${ARTIFACTORY_USER}:${ARTIFACTORY_PASSWORD} --silent --request GET "${ARTIFACTORY_URL}/artifactory/api/search/dates?dateFields=lastModified&from=${checkdate}&repos=${REPOS}" |
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 | |
sonar_version="6.7.4" | |
cxx_version="1.1.0" | |
SONAR_HOME="/home/one/sonarqube" | |
#Stop and delete sonarqube installation | |
$SONAR_HOME/bin/linux-x86-64/sonar.sh stop | |
rm -rf $SONAR_HOME/ |
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 | |
AUTHENTICATION_TOKEN="<AUTHENTICATION_TOKEN>" | |
JENKINS_URL="<JENKINS_URL>" | |
JOB="<JOB>" | |
USER="<USER>" | |
API_TOKEN="<API_TOKEN>" | |
TOKEN="<TOKEN>" | |
EComponents="mydeb.deb" |
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('myslave') { | |
stage('downstream') { | |
sh """ | |
export shortDescription="${getCauser()?.shortDescription}" | |
export upstreamBuild="${getCauser()?.upstreamBuild}" | |
export upstreamUrl="${getCauser()?.upstreamUrl}" | |
export upstreamProject="${getCauser()?.upstreamProject}" | |
""" | |
} | |
} |
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 | |
export JFROG_CLI_OFFER_CONFIG="false" | |
source_folder_name="abc" | |
source_url="http://<SOURCE_URL>:8081/artifactory" | |
source_user="" | |
source_password="" | |
target_folder_name="blablabla" |
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 groovy.json.JsonSlurper | |
def sonarqube_host = "http://SONARQUBE_URL:9000" | |
def projectname = "MY_PROJECT" | |
def SONARCUBE_URL = "${sonarqube_host}/api/measures/component?componentKey=${projectname}&metricKeys=coverage,ncloc" | |
def son_ncloc = 'N/A' | |
def son_coverage = 'N/A' | |
def son_qgates = 'N/A' |
OlderNewer