aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/jenkins/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/jenkins/scripts')
-rwxr-xr-xbootstrap/jenkins/scripts/clone-all.sh5
-rwxr-xr-xbootstrap/jenkins/scripts/gen-java-jobs.py27
-rwxr-xr-xbootstrap/jenkins/scripts/ls-projects.sh2
-rwxr-xr-xbootstrap/jenkins/scripts/ls-top-poms.sh2
-rwxr-xr-xbootstrap/jenkins/scripts/pull-all.sh8
5 files changed, 44 insertions, 0 deletions
diff --git a/bootstrap/jenkins/scripts/clone-all.sh b/bootstrap/jenkins/scripts/clone-all.sh
new file mode 100755
index 000000000..6bdb68a09
--- /dev/null
+++ b/bootstrap/jenkins/scripts/clone-all.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while read p; do
+ echo $p
+ git clone ssh://gerrit.onap.org:29418/$p $p
+done < projects.txt
diff --git a/bootstrap/jenkins/scripts/gen-java-jobs.py b/bootstrap/jenkins/scripts/gen-java-jobs.py
new file mode 100755
index 000000000..0da988083
--- /dev/null
+++ b/bootstrap/jenkins/scripts/gen-java-jobs.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+import fileinput
+import os
+import subprocess
+
+print """- project:
+ name: onap-java
+ jobs:
+ - 'java-{project}'
+ project:"""
+
+for line in fileinput.input():
+ repo = line.strip()
+ isGroupRepo = subprocess.call("grep -s 'Group repo' {}/README.md > /dev/null".format(repo), shell=True) == 0
+ if not isGroupRepo:
+ pompaths = os.popen("./ls-top-poms.sh {}".format(repo)).readlines()
+ for pompath in pompaths:
+ pompath = pompath.strip()
+ project = repo.replace("/", "_")
+ if pompath:
+ project += "_" + pompath.replace("/", "_")
+ print " - '{}':".format(project)
+ print " repo: '{}'".format(repo)
+ if pompath:
+ print " pom: '{}/pom.xml'".format(pompath)
+ else:
+ print " pom: 'pom.xml'"
diff --git a/bootstrap/jenkins/scripts/ls-projects.sh b/bootstrap/jenkins/scripts/ls-projects.sh
new file mode 100755
index 000000000..17b8c7893
--- /dev/null
+++ b/bootstrap/jenkins/scripts/ls-projects.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+ssh -p 29418 gerrit.onap.org gerrit ls-projects | grep -v All
diff --git a/bootstrap/jenkins/scripts/ls-top-poms.sh b/bootstrap/jenkins/scripts/ls-top-poms.sh
new file mode 100755
index 000000000..e856ee977
--- /dev/null
+++ b/bootstrap/jenkins/scripts/ls-top-poms.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+find $1 -mindepth 0 -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P\n" | sort
diff --git a/bootstrap/jenkins/scripts/pull-all.sh b/bootstrap/jenkins/scripts/pull-all.sh
new file mode 100755
index 000000000..cf6655ce7
--- /dev/null
+++ b/bootstrap/jenkins/scripts/pull-all.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+while read p; do
+ echo $p
+ cd ~/Projects/onap/$p
+ git fetch
+ git reset --hard origin
+ git clean -f -d -x
+done < projects.txt