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
#!/usr/bin/env groovy | |
final String JENKINS_URL = "<YOUR JEKINS URL>" // TODO add your Jenkins URL | |
final String JOB_NAME = new File(".").canonicalFile.name} | |
/* | |
* define CLI | |
*/ | |
def cli = new CliBuilder(usage: "open-jenkins [-b <build-number> [-c OR -t]]") |
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
#!/usr/bin/env groovy | |
/* | |
* define CLI | |
*/ | |
def cli = new CliBuilder(usage: "${this.class.name} [options]") | |
cli.usage() | |
/* | |
* open URL |
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
#!/usr/bin/env bash | |
# | |
# executes mvn clean for all sub directories containing a pom.xml | |
# | |
find . -name "pom.xml" -exec mvn clean -f '{}' \; |
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
#!/usr/bin/env groovy | |
/* | |
* define CLI | |
*/ | |
def cli = new CliBuilder(usage: "open-log [options]", ) | |
final String DEFAULT_ENVIRONMENT = "prod" | |
cli.e(longOpt: "environment", args: 1, argName: "environment", | |
"Environment whose logs should be displayed (either int, pre or prod).\nDefault: ${DEFAULT_ENVIRONMENT}") |
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
#!/usr/bin/env groovy | |
// see https://jenkinsci.github.io/job-dsl-plugin/ and https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob | |
pipelineJob("my-maven-lib") { | |
displayName("My Maven Lib") | |
definition { | |
cpsScm { | |
scm { | |
git { | |
remote { |
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
#!/usr/bin/env groovy | |
// see https://jenkins.io/doc/book/pipeline/syntax/ | |
pipeline { | |
agent any | |
tools { | |
maven "Maven" | |
} |
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
#!/usr/bin/env bash | |
# | |
# restores the given file if known to git | |
# | |
if [ $# -ne 1 ]; then | |
echo "No file given." | |
echo -e "\nUsage:\n\t$(basename $0) [file_to_restore]" | |
exit 1 |
NewerOlder