Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Start installing go modules and their dependencies | |
Done | |
Installing gomobile fork | |
Done | |
GO111MODULE="" | |
GOARCH="amd64" |
#!/usr/bin/env bash | |
PROJECT_NAME="project-name" | |
CONTAINER_NAME="container" | |
# define some colors to use for output | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
# kill and remove any running containers | |
cleanup () { |
import jenkins.model.* | |
jenkinsInstance = jenkins.model.Jenkins.instance | |
allItems = jenkinsInstance.getAllItems() | |
for(int i = 0; i < allItems.size(); i++) { | |
if(!(allItems[i] instanceof com.cloudbees.hudson.plugins.folder.Folder) && !(allItems[i] instanceof org.jenkinsci.plugins.workflow.job.WorkflowJob) && allItems[i].getAssignedLabelString() =~ "centos"){ | |
allItems[i].setAssignedLabel(jenkins.model.Jenkins.instance.getLabel("centos_7.2")) | |
println(allItems[i].name + ": " + allItems[i].getAssignedLabel()) | |
} | |
} |
Pod::Spec.new do |s| | |
s.name = "Calabash" | |
s.version = "0.17.0" | |
s.summary = "Calabash is an automated testing technology for Android and iOS native and hybrid applications." | |
s.homepage = "https://github.com/calabash/calabash-ios" | |
s.license = { :type => "Eclipse Public License 1.0", :text => <<-LICENSE | |
Calabash-ios Copyright (2015) Karl Krukow. All rights reserved.\n | |
The use and distribution terms for this software are covered by the\n | |
Eclipse Public License 1.0\n |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
#Check if an argument was supplied | |
if [ -z "$1" ] | |
then | |
echo "No argument supplied, please provide video name" | |
else | |
# start recording | |
adb shell screenrecord /sdcard/$1.mp4 & | |
# Get its PID | |
PID=$! |
import argparse | |
import subprocess | |
import re | |
import sys | |
import os | |
parser = argparse.ArgumentParser(description="Android SDK updater") | |
parser.add_argument("-o", "--proxy-host", dest="proxy_host", help="HTTP/HTTPS proxy host") | |
parser.add_argument("-p", "--proxy-port", dest="proxy_port", help="HTTP/HTTPS proxy port") |
private void swipeToLeft(int stepCount, int repNumber) { | |
for(int x = 0; x < repNumber; x++) { | |
solo.waitForActivity(solo.getCurrentActivity().toString(), 5000); | |
Display display = solo.getCurrentActivity().getWindowManager().getDefaultDisplay(); | |
int width = 0; | |
int height = 0; | |
if (android.os.Build.VERSION.SDK_INT <= 13) { | |
width = display.getWidth(); | |
height = display.getHeight(); | |
} else { |