Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
| rsync -aHAXxv --numeric-ids --delete --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir> |
| ############################################################################################################### | |
| # these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a | |
| # power failure. | |
| # works with apc smartups 750xl and esxi 5.5u1 | |
| ############################################################################################################### | |
| 0# make a new VM and install Ubuntu-Server on it | |
| 1# install apcupsd | |
| apt-get install apcupsd |
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
| GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
| # (if you're backing up a user's repos instead, this should be your GitHub username) | |
| GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API) | |
| GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account | |
| GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments) | |
| GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/bin/sh | |
| # script to automate the load and export to CSV of an oracle dump | |
| # This script assumes: | |
| # * you have the vagrant published key available locally in your .ssh directory | |
| # * You have the Oracle VirtualBox image running locally | |
| # ** ssh port-forwarding is configured for host port 2022 -> guess port 22. | |
| set -e |
| apt-get install -y curl | |
| # Install nginx | |
| if [ "xx" = "x$(grep 'nginx' /etc/apt/sources.list )x" ] ; then | |
| echo 'Installing nginx...' | |
| echo ' | |
| # Repositories for up to date nginx packages | |
| deb http://nginx.org/packages/mainline/ubuntu/ precise nginx | |
| deb-src http://nginx.org/packages/mainline/ubuntu/ precise nginx' >> /etc/apt/sources.list | |
| curl -s http://nginx.org/keys/nginx_signing.key | apt-key add - | |
| apt-get update > /dev/null |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync