summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/README25
-rwxr-xr-xci/jenkins-slave2
-rwxr-xr-xci/jenkins-slave.init128
-rw-r--r--scenarios/README1
4 files changed, 1 insertions, 155 deletions
diff --git a/ci/README b/ci/README
deleted file mode 100755
index d1bb1b1..0000000
--- a/ci/README
+++ /dev/null
@@ -1,25 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd.
-# meimei@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0#
-##############################################################################
-Before use this script please make sure things below you have done:
-1.Install JDK on server
-2.Create local user on server: jenkins
-3.Your slave has been configured in OPNFV Jenkins master
-4.Create slave's local workspace that has been configured in jenkins master
-5.Download slave.jar and put it into the folder of /home/jenkins/
-6.Obtain slave's token from Linux Foundation Helpdesk
-Consult wiki : https://wiki.opnfv.org/wiki/jenkins#how_to_connect_servers_from_labs_to_opnfv_jenkins
-
-Follow steps below to launch your slave to OPNFV Jenkins:
-1. cp jenkins-slave.init /etc/init.d/jenkins-slave
-2. chmod +x /etc/init.d/jenkins-slave
-3. Define $SLAVENAME&$TOKEN in config file(jenkins-slave)
-4. cp jenkins-slave /etc/default/jenkins-slave
-5. service jenkins-slave start
-
-Finally, run "service jenkins-slave status" command to check the process is running, see the log(/home/jenkins/jenkins-slave/slave.log) to confirm the connection to OPNFV Jenkins.
diff --git a/ci/jenkins-slave b/ci/jenkins-slave
deleted file mode 100755
index 975f384..0000000
--- a/ci/jenkins-slave
+++ /dev/null
@@ -1,2 +0,0 @@
-SLAVENAME=[slave's name]
-TOKEN=[slave's secret token]
diff --git a/ci/jenkins-slave.init b/ci/jenkins-slave.init
deleted file mode 100755
index 35dc2fd..0000000
--- a/ci/jenkins-slave.init
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd.
-# meimei@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0#
-##############################################################################
-set -o errexit
-set -o nounset
-set -o pipefail
-
-SLAVE_CONF="/etc/default/jenkins-slave"
-
-if [ -f ${SLAVE_CONF} ]
-then
- . ${SLAVE_CONF}
-else
- echo "Error : Configuration file ($SLAVE_CONF) does not exist, details please refer to README."
- exit
-fi
-
-if [ -z "${SLAVENAME}" ] || [ -z "${TOKEN}" ]
-then
- echo "Error : Please define SLAVENAME and TOKEN values in the Configuration file ($SLAVE_CONF), details please refer to README."
- exit
-fi
-
-SLAVE_JNLP="-jnlpUrl https://build.opnfv.org/ci/computer/${SLAVENAME}/slave-agent.jnlp"
-JENKINS_HOME="/home/jenkins"
-SLAVE_JAR="${JENKINS_HOME}/slave.jar"
-JENKINS_SLAVE_ROOTDIR="${JENKINS_HOME}/jenkins-slave"
-PID_FILE="${JENKINS_SLAVE_ROOTDIR}/slave.pid"
-SLAVE_LOG="${JENKINS_SLAVE_ROOTDIR}/slave.log"
-USER="jenkins"
-GROUP="jenkins"
-JAVA_BIN="/usr/bin/java"
-
-if [ ! -f ${SLAVE_JAR} ]
-then
- echo "Error : ${SLAVE_JAR} dosenot exist, details please refer to README."
- exit
-fi
-
-[ -e ${JENKINS_SLAVE_ROOTDIR} ] || { mkdir ${JENKINS_SLAVE_ROOTDIR}; chown ${USER}:${GROUP} ${JENKINS_SLAVE_ROOTDIR};};
-if [ ! -d ${JENKINS_SLAVE_ROOTDIR} ]
-then
- echo "Error : ${JENKINS_SLAVE_ROOTDIR} can not be created! Maybe there is a file with the same name of 'jenkins-slave'."
- exit
-fi
-
-usage ()
-{
-cat<<EOF
-Usage: jenkins-slave {start|stop|restart}
-EOF
-}
-
-start()
-{
- echo "Starting jenkins slave(${SLAVENAME})"
- if ! start-stop-daemon --start -m -b -c ${USER} -p ${PID_FILE} \
- --startas /bin/bash -- -c \
- "exec ${JAVA_BIN} -jar ${SLAVE_JAR} ${SLAVE_JNLP} -secret ${TOKEN} >>${SLAVE_LOG} 2>&1"
- then
- echo "Start jenkins slave failed!"
- else
- echo "DONE."
- fi
-}
-
-stop()
-{
- echo "Stopping jenkins slave(${SLAVENAME})"
- if ! start-stop-daemon --stop -p ${PID_FILE}
- then
- echo "Stop jenkins slave failed!"
- else
- echo "DONE."
- fi
- rm -f ${PID_FILE}
-}
-
-status()
-{
- set +e
- pid=`ps -ef | grep "${SLAVE_JAR}" | grep -v 'grep' | awk '{print $2}'`
- set -e
- if [ -z $pid ]
- then
- echo "jenkins slave is not running!"
- else
- echo "jenkins slave is running, pid is $pid"
- fi
-}
-
-if [ $# -gt 0 ]
-then
- OPTION=$1
-else
- echo "Please input your argument!"
- usage
- exit 1
-fi
-
-case "$OPTION" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- sleep 2
- start
- ;;
- status)
- status
- ;;
- *)
- echo "Error: $OPTION is not a valid argument"
- usage
- exit 1
- ;;
-esac
-
diff --git a/scenarios/README b/scenarios/README
new file mode 100644
index 0000000..a858bd7
--- /dev/null
+++ b/scenarios/README
@@ -0,0 +1 @@
+This folder will contain all scenario descriptor yaml files.