From 1343ffddffa5b48b257f09d769c66dd3553f9539 Mon Sep 17 00:00:00 2001 From: Peter Mosmans Date: Wed, 10 Aug 2016 15:20:35 +0200 Subject: [PATCH] Added support for NAMESPACEID --- chatops/bash/handler_pentest | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chatops/bash/handler_pentest b/chatops/bash/handler_pentest index c4046ff..db2f2a7 100644 --- a/chatops/bash/handler_pentest +++ b/chatops/bash/handler_pentest @@ -17,7 +17,7 @@ # (at your option) any later version. -VERSION=0.7 +VERSION=0.8 SAXON=/usr/local/bin/saxon/saxon9he.jar TEMPLATEREPO=ssh://git@gitlab.local/peter/templates @@ -25,7 +25,8 @@ TEMPLATEREPO=ssh://git@gitlab.local/peter/templates [ -z $GITLABCLI ] && GITLABCLI=gitlab [ -z $GITSERVER ] && GITSERVER=gitlab.local [ -z $NAMESPACE ] && NAMESPACE=ros -[ -z $PENTEXTREPO ] && PENTEXTREPO=https://github.com/radicallyopensecurity/templates +[ -z $NAMESPACEID ] && NAMESPACEID=1 +[ -z $PENTEXTREPO ] && PENTEXTREPO=https://github.com/radicallyopensecurity/pentext TEMPLOC=$(mktemp -d) pentext=$(echo $PENTEXTREPO|awk -F '/' '{print $5}') @@ -81,7 +82,7 @@ preflight_checks() { } setup_repo() { - project_id=$($GITLABCLI project create --name $REPO --issues-enabled true --wiki-enabled true --snippets-enabled true --wall-enabled true --merge-requests-enabled true 2>/dev/null| awk '/id:/{print $2}') + project_id=$($GITLABCLI project create --name $REPO --namespace $NAMESPACEID --issues-enabled true --wiki-enabled true --snippets-enabled true --wall-enabled true --merge-requests-enabled true 2>/dev/null| awk '/id:/{print $2}') if [ ! -z $project_id ]; then echo "[+] successfully created gitlab project $REPO with id ${project_id}" $GITLABCLI project-label create --project-id ${project_id} --name documentation --color "#0000FF" &>/dev/null