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 | |
| # Author : Chris Maggiulli | |
| # This script pulls an image from a registry, extracts a war file, then prints a checksum. | |
| # This script was used for troubleshooting issues with build/release process | |
| docker container prune --force | |
| docker image prune --force | |
| app=temp.war | |
| id=`docker run -it -d 884325331078.dkr.ecr.us-east-1.amazonaws.com/$app:prod-20210912-203818-git8c0b8fd5` |
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
| /** | |
| * | |
| * | |
| * @Author Chris Maggiulli | |
| * @See https://plugins.jenkins.io/jobConfigHistory/ | |
| * @description This script will determine Jenkins projects ( freestyle jobs, pipelines, multi configuration jobs, etc ) that have been created in the last N days. | |
| * For this script to work the <b>Jobs Configuration History</b> plugin must have been installed before the creation of any job you wish to capture | |
| **/ | |
| @Grapes([ |
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
| properties([ | |
| buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30')), | |
| disableConcurrentBuilds(), | |
| pipelineTriggers([cron('')]) | |
| parameters([string(name: 'ENVIRONMENT', defaultValue: 'test')]) | |
| ]) | |
| node('jdk11') { | |
| def PATH = "output/headers/" | |
| def BUCKET = ENVIRONMENT.toLowerCase() == "live" ? "integration-prod" : "integration-${ENVIRONMENT}" |
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
| <!-- deploy --> | |
| <target name="deploy"> | |
| <echo message="Deploying ${tomcat.webapp} to ${tomcat.environment}" /> | |
| <for list="${tomcat.servers}" param="tomcat.server"> | |
| <sequential> | |
| <sshexec host="@{tomcat.server}" username="${user.name}" | |
| command="/u01/tomcat-sites/${tomcat.environment}/shutdown.sh" | |
| keyfile="${user.home}/.ssh/id_dsa" /> | |
| <sshexec host="@{tomcat.server}" username="${user.name}" | |
| command="rm -rf /u01/tomcat-sites/${tomcat.environment}/webapps/${tomcat.webapp}" |
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
| Jenkins.instance.nodes.find{ it.name.toLowerCase() ==~ /.*pentaho.*/ }.each{ println it?.computer?.disconnect() } |
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
| set -e | |
| export BUILD_ID=dontKillMe | |
| export JENKINS_NODE_COOKIE=dontKillMe | |
| //sh 'JENKINS_NODE_COOKIE=dontKillMe myProcess' | |
| //https://wiki.jenkins.io/display/JENKINS/ProcessTreeKiller | |
| //https://issues.jenkins.io/browse/JENKINS-28182?focusedCommentId=304426&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-304426 |
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
| /** | |
| * @author Chris Maggiulli | |
| * This is a sample script meant to dump all users across all subunits into a CSV file. | |
| * We have to make SOAP requests as generic HTTP requests because the eValue WSDL does not include the correct request payloads | |
| * I have commented out functional paradigm code in favor of procedural because of issues with autoboxing in Groovy | |
| **/ | |
| @Grapes([ | |
| @Grab(group='org.apache.httpcomponents', module='httpclient', version='4.5.13'), | |
| @Grab(group='com.oracle.database.jdbc', module='ojdbc6', version='11.2.0.4') |
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('master') { | |
| stage('downstream') { | |
| def upstream = currentBuild.rawBuild.getCause(hudson.model.Cause$UpstreamCause) | |
| echo upstream?.shortDescription | |
| } | |
| } |
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 { | |
| agent { | |
| label 'jdk11' | |
| } | |
| triggers { | |
| cron('30 7 * * 1-5') | |
| } |
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 | |
| CHANGE_REPORT=./change-report.log | |
| echo "Change list report for the last 7 days" > ${CHANGE_REPORT} | |
| DATE=`date` | |
| echo "Changes as of ${DATE}" >> ${CHANGE_REPORT} | |
| echo "======================================" >> ${CHANGE_REPORT} | |
| START_DATE=`date +"%Y-%m-%d" -d "7 days ago"` | |
| END_DATE=`date +"%Y-%m-%d" -d "tomorrow"` |