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
import urllib | |
import urllib2 | |
import base64 | |
import json | |
username = "mail" | |
password = "passwd" | |
base64string = base64.encodestring('%s:%s' % (username, password))[:-1] | |
url = 'https://bitbucket.org/api/2.0/repositories/bekom/' |
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
import hudson.model.* | |
import hudson.plugins.git.* | |
changeBranche(Jenkins.instance.items) | |
def changeBranche(items) { | |
println items.size | |
for (item in items) { | |
if (item =~ "Feature*") { | |
print(item.name) |
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
import hudson.model.* | |
import hudson.plugins.git.* | |
changeBranche(Jenkins.instance.items) | |
def changeBranche(items) { | |
println items.size | |
for (item in items) { | |
if (item =~ "Feature*") { | |
print(item.name) |
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
import hudson.model.* | |
import hudson.plugins.git.* | |
changeBranche(Jenkins.instance.items) | |
def changeBranche(items) { | |
for (item in items) { | |
if (item =~ "Feature*") { | |
println(item.name) | |
for (ext in item.scm.extensions) { |
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
git remote rm origin | |
# Supprime les tags | |
for tag in `git tag`; do git tag -d $tag; done | |
# filtrer les commits n'appartenant qu'au module souhaité | |
git filter-branch -f --prune-empty --index-filter \ | |
'git rm --cached -r -q -- . ; git reset -q $GIT_COMMIT -- dir1 dir2 dir3' -- --all |
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
git remote rm origin | |
# Supprime les tags | |
for tag in `git tag`; do git tag -d $tag; done | |
# filtrer les commits n'appartenant qu'au module souhaité | |
git filter-branch --subdirectory-filter dir1 -- --all |
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
import subprocess | |
import requests | |
import os | |
import sys | |
if len(sys.argv) < 2: | |
print("") | |
print("Usage: sync_gravitee.py [https | ssh]") | |
print(" clone mode : https or ssh") | |
sys.exit(1) |
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
for (item in Jenkins.instance.items) { | |
if ( ! item.disabled ) { | |
for( trigger in item.triggers) { | |
if(trigger.value.spec != "") { | |
println "${item.name} ${trigger.value.spec}" | |
} | |
} | |
} | |
} |
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
git filter-branch -f --env-filter ' | |
LANG=en_US.utf8 | |
original_git_date="$GIT_COMMITTER_DATE" | |
cutDate=$(echo $original_git_date | rev | cut -d" " -f2 |rev) | |
hour=$(date --date "$cutDate" +%H) | |
day=$(date --date "$cutDate" +%u) | |
new_git_date=$(date --date "$cutDate" +"%a %b %d %T %Y") | |
if [ "$hour" -gt "9" ] && [ "$hour" -lt "19" ] && [ "$day" -lt "6" ] | |
then | |
new_git_date=$(date --date "$new_git_date 9 hours" +"%a %b %d %T %Y %z") |
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
for f in *;do if [[ -d $f ]]; then pushd $f 2>&1 1>/dev/null; echo "\n====== $f" && gfa && gco master && gm; popd 2>&1 1>/dev/null; fi; done; | |
for f in *;do if [[ -d $f ]]; then pushd $f 2>&1 1>/dev/null; if [[ -e "pom.xml" ]]; then echo "\n====== $f" && mvnci; fi; popd 2>&1 1>/dev/null; fi; done; |
OlderNewer