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
#!/usr/bin/env bash | |
: ' Move Git repository from an old remote to a new one | |
' | |
# check if debug flag is set | |
if [ "${DEBUG}" = true ]; then | |
set -x # enable print commands and their arguments as they are executed. |
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 | |
/* | |
Please read carefully the plugin and Docker service docs | |
It is required to enable the options below in the Docker service for this plugin to work: | |
DOCKER_OPTS="-H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock" | |
Also, you need to secure your Docker daemon socket, steps here: | |
https://docs.docker.com/engine/security/https/ |
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 |
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 jenkins.model.Jenkins | |
// parameters | |
def gitParameters = [ | |
globalConfigEmail: 'my-jenkins@my-company.com', | |
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 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 com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.domains.Domain | |
import com.cloudbees.plugins.credentials.impl.* | |
import hudson.util.Secret | |
import jenkins.model.Jenkins | |
import com.cloudbees.jenkins.plugins.bitbucket.endpoints.* |
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 validate a remote Docker service running with TLS | |
It assumes that the server was configured using my other script hosted in | |
Gist through the link; | |
https://gist.github.com/ivan-pinatti/6ad05557e526f1f32ca357d15139df83 | |
Usage: |
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.BitbucketSecurityRealm | |
// parameters | |
def bitbucketSecurityRealmParameters = [ |
OlderNewer