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 | |
: ' Script to sync a music library from local machine to an Android device | |
through a SSH connection using rsync and checking files using size only | |
method. | |
I do recommend SSHelper as a SSH server for Android devices, you can | |
download and install it from here: | |
https://play.google.com/store/apps/details?id=com.arachnoid.sshelper | |
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 | |
: ' Script that collects disk space from Linux and pushes a message to Slack with | |
the results, if it is an alert it will also mention @channel. | |
' | |
# check if debug flag is set | |
if [ "${DEBUG}" = true ]; then |
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
#!groovy | |
// | |
// only works on Jenkins version < 2.165 | |
// | |
// imports | |
import jenkins.model.Jenkins | |
// get Jenkins instance |
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
import jenkins.security.s2m.* | |
// get Jenkins instance | |
Jenkins jenkins = Jenkins.getInstance() | |
// define protocols |
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
import hudson.security.csrf.DefaultCrumbIssuer | |
// get Jenkins instance | |
Jenkins jenkins = Jenkins.getInstance() | |
// set default crumb issuer |
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
import jenkins.model.JenkinsLocationConfiguration | |
// parameters | |
def jenkinsParameters = [ | |
email: 'Jenkins Admin <[email protected]>', | |
url: 'https://ci.jenkins.com:8083/' |
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
// parameter | |
Integer numberOfExecutors = 2 | |
// get Jenkins instance | |
Jenkins jenkins = Jenkins.getInstance() |
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
#!groovy | |
// imports | |
import jenkins.model.Jenkins | |
// parameters | |
def gitParameters = [ | |
globalConfigEmail: '[email protected]', | |
globalConfigName: 'Jenkins CI' | |
] |
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
#!groovy | |
// imports | |
import hudson.security.AuthorizationStrategy | |
import hudson.security.SecurityRealm | |
import jenkins.model.Jenkins | |
import org.jenkinsci.plugins.GithubAuthorizationStrategy | |
import org.jenkinsci.plugins.GithubSecurityRealm | |
// parameters |
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
#!groovy | |
// imports | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.Domain | |
import com.cloudbees.plugins.credentials.impl.* | |
import hudson.util.Secret | |
import java.nio.file.Files |
OlderNewer