summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/aai/aai-aai-service.yaml6
-rw-r--r--jjb/aai/aai-model-loader.yaml6
-rw-r--r--jjb/dcae/collectors-ves.yaml41
-rwxr-xr-xjjb/dcae/script-collectors-ves-daily-release.sh118
-rwxr-xr-xjjb/dcae/script-collectors-ves-merge.sh118
-rwxr-xr-xjjb/dcae/script-collectors-ves-verify.sh114
-rw-r--r--jjb/global-templates-java.yaml65
-rw-r--r--jjb/include-docker-push.sh10
-rw-r--r--jjb/policy/include-raw-docker-verify.sh12
-rw-r--r--jjb/policy/policy-docker.yaml7
10 files changed, 491 insertions, 6 deletions
diff --git a/jjb/aai/aai-aai-service.yaml b/jjb/aai/aai-aai-service.yaml
index e4ca295a7..89aeedbe7 100644
--- a/jjb/aai/aai-aai-service.yaml
+++ b/jjb/aai/aai-aai-service.yaml
@@ -6,9 +6,9 @@
- '{project-name}-{stream}-verify-java'
- '{project-name}-{stream}-merge-java'
- '{project-name}-{stream}-release-java-daily'
- - '{project-name}-{stream}-docker-java-daily':
- docker-pom: 'ajsc-aai/pom.xml'
- mvn-profile: 'docker'
+ - '{project-name}-{stream}-aai-docker-java-daily':
+ pom: 'ajsc-aai/pom.xml'
+ mvn-goals: '-P docker'
project: 'aai/aai-service'
stream:
diff --git a/jjb/aai/aai-model-loader.yaml b/jjb/aai/aai-model-loader.yaml
index a6c0b76fd..293c47137 100644
--- a/jjb/aai/aai-model-loader.yaml
+++ b/jjb/aai/aai-model-loader.yaml
@@ -6,9 +6,9 @@
- '{project-name}-{stream}-verify-java'
- '{project-name}-{stream}-merge-java'
- '{project-name}-{stream}-release-java-daily'
- - '{project-name}-{stream}-docker-java-daily':
- docker-pom: 'pom.xml'
- mvn-profile: 'docker'
+ - '{project-name}-{stream}-aai-docker-java-daily':
+ pom: 'pom.xml'
+ mvn-goals: '-P docker'
project: 'aai/model-loader'
stream:
- 'master':
diff --git a/jjb/dcae/collectors-ves.yaml b/jjb/dcae/collectors-ves.yaml
new file mode 100644
index 000000000..43232cc28
--- /dev/null
+++ b/jjb/dcae/collectors-ves.yaml
@@ -0,0 +1,41 @@
+---
+
+- project:
+ name: dcae-collectors-ves
+
+ # job template iterators
+ project-name: 'dcae-collectors-ves'
+ stream:
+ - 'master':
+ branch: 'master'
+
+ # apply to all jobs
+ project: 'dcae/collectors/ves'
+ mvn-settings: 'dcae-collectors-ves-settings'
+ # default to no op
+ mvn-goals: '--version'
+ # default to no op
+ mvn-goals-versioning: '--version'
+ files: '**'
+ archive-artifacts: ''
+
+ jobs:
+ - '{project-name}-{stream}-daily-release-scm-mvn-script':
+ # job specific
+ mvn-goals-versioning:
+ 'versions:set versions:update-child-modules versions:commit -D1.0.0-SNAPSHOT'
+ mvn-goals: 'clean deploy'
+ maven-deploy-properties: |
+ deployAtEnd=true
+ script:
+ !include-raw-escape: 'script-collectors-ves-daily-release.sh'
+ - '{project-name}-{stream}-merge-scm-mvn-script':
+ # job specific
+ mvn-goals: 'clean deploy'
+ script:
+ !include-raw-escape: 'script-collectors-ves-merge.sh'
+ - '{project-name}-{stream}-verify-scm-mvn-script':
+ # job specific
+ mvn-goals: 'clean install'
+ script:
+ !include-raw-escape: 'script-collectors-ves-verify.sh'
diff --git a/jjb/dcae/script-collectors-ves-daily-release.sh b/jjb/dcae/script-collectors-ves-daily-release.sh
new file mode 100755
index 000000000..53fb06e82
--- /dev/null
+++ b/jjb/dcae/script-collectors-ves-daily-release.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+#
+# 1 fetch DCAE Controller service manager
+# 2 build the docker imagei with both service manager and ves collector
+# 3 tag and then push to the remote repo
+#
+#
+# !!! make sure the yaml jjb file includes docker-login as a builder
+# before calling this script
+
+
+# downloading DCAE Controller service manager for VES collector
+GROUP_ID='org.openecomp.dcae.controller'
+ARTIFACT_ID='dcae-controller-service-standardeventcollector-manager'
+VERSION='0.1.0-SNAPSHOT'
+FORMAT='zip'
+SCOPE='runtime'
+ARTIFACT_FQID="${GROUP_ID}:${ARTIFACT_ID}:${VERSION}:${FORMAT}:${SCOPE}"
+ARTIFACT_FILENAME="${ARTIFACT_ID}-${VERSION}-${SCOPE}.${FORMAT}"
+mvn -s "$SETTINGS_FILE" \
+ org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \
+ -Dartifact="${ARTIFACT_FQID}" -DoutputDirectory=/tmp
+DCM_AR="/tmp/${ARTIFACT_FILENAME}"
+if [ ! -f "${DCM_AR}" ]
+then
+ echo "FATAL error cannot locate ${DCM_AR}"
+ exit 2
+fi
+
+# unarchive the service manager
+TARGET="${WORKSPACE}/target"
+STAGE="${TARGET}/stage"
+DCM_DIR="${STAGE}/opt/app/manager"
+[ ! -d "${DCM_DIR}" ] && mkdir -p "${DCM_DIR}"
+unzip -qo -d "${DCM_DIR}" "${DCM_AR}"
+
+#
+# generate the manager start-up.sh
+#
+[ -f "${DCM_DIR}/start-manager.sh" ] && exit 0
+
+cat <<EOF > "${DCM_DIR}/start-manager.sh"
+#!/bin/bash
+
+MAIN='org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.DcaeControllerServiceStandardeventcollectorManagerServer'
+ACTION='start'
+
+WORKDIR='/opt/app/manager'
+LOGS="${WORKDIR}/logs"
+
+[ ! -d "$LOGS" ] && mkdir -p "$LOGS"
+
+echo 10.0.4.102 $(hostname).dcae.simpledemo.openecomp.org >> /etc/hosts
+
+exec java -cp ./config:./lib:./lib/*:./bin "${MAIN}" "${ACTION}" \
+ > logs/manager.out 2>logs/manager.err
+EOF
+
+chmod 775 "${DCM_DIR}/start-manager.sh"
+
+
+#
+# generate docker file
+#
+cat <<EOF > "${STAGE}/Dockerfile"
+FROM ubuntu:14.04
+
+MAINTAINER dcae@lists.openecomp.org
+
+WORKDIR /opt/app/manager
+
+ENV HOME /opt/app/SEC
+ENV JAVA_HOME /usr
+
+RUN apt-get update && apt-get install -y \
+ bc \
+ curl \
+ telnet \
+ vim \
+ netcat \
+ openjdk-7-jdk
+
+COPY opt /opt
+
+EXPOSE 9999
+
+CMD [ '/opt/app/manager/start-manager.sh' ]
+EOF
+
+#
+# build the docker image. tag and then push to the remote repo
+#
+IMAGE='dcae-controller-common-event'
+TAG='1.0.0'
+LFQI="${IMAGE}:${TAG}"
+BUILD_PATH="${WORKSPACE}/target/stage"
+
+# build a docker image
+docker build --rm -t "${LFQI}" "${BUILD_PATH}"
+
+
+#
+# push the image
+#
+# io registry DOCKER_REPOSITORIES="nexus3.openecomp.org:10001 \
+# release registry nexus3.openecomp.org:10002 \
+# snapshot registry nexus3.openecomp.org:10003"
+REPO='nexus3.openecomp.org:10003'
+
+if [ ! -z "$REPO" ]; then
+ RFQI="${REPO}/${LFQI}"
+ # tag
+ docker tag "${LFQI}" "${RFQI}"
+
+ # push to remote repo
+ docker push "${RFQI}"
+fi \ No newline at end of file
diff --git a/jjb/dcae/script-collectors-ves-merge.sh b/jjb/dcae/script-collectors-ves-merge.sh
new file mode 100755
index 000000000..53fb06e82
--- /dev/null
+++ b/jjb/dcae/script-collectors-ves-merge.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+#
+# 1 fetch DCAE Controller service manager
+# 2 build the docker imagei with both service manager and ves collector
+# 3 tag and then push to the remote repo
+#
+#
+# !!! make sure the yaml jjb file includes docker-login as a builder
+# before calling this script
+
+
+# downloading DCAE Controller service manager for VES collector
+GROUP_ID='org.openecomp.dcae.controller'
+ARTIFACT_ID='dcae-controller-service-standardeventcollector-manager'
+VERSION='0.1.0-SNAPSHOT'
+FORMAT='zip'
+SCOPE='runtime'
+ARTIFACT_FQID="${GROUP_ID}:${ARTIFACT_ID}:${VERSION}:${FORMAT}:${SCOPE}"
+ARTIFACT_FILENAME="${ARTIFACT_ID}-${VERSION}-${SCOPE}.${FORMAT}"
+mvn -s "$SETTINGS_FILE" \
+ org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \
+ -Dartifact="${ARTIFACT_FQID}" -DoutputDirectory=/tmp
+DCM_AR="/tmp/${ARTIFACT_FILENAME}"
+if [ ! -f "${DCM_AR}" ]
+then
+ echo "FATAL error cannot locate ${DCM_AR}"
+ exit 2
+fi
+
+# unarchive the service manager
+TARGET="${WORKSPACE}/target"
+STAGE="${TARGET}/stage"
+DCM_DIR="${STAGE}/opt/app/manager"
+[ ! -d "${DCM_DIR}" ] && mkdir -p "${DCM_DIR}"
+unzip -qo -d "${DCM_DIR}" "${DCM_AR}"
+
+#
+# generate the manager start-up.sh
+#
+[ -f "${DCM_DIR}/start-manager.sh" ] && exit 0
+
+cat <<EOF > "${DCM_DIR}/start-manager.sh"
+#!/bin/bash
+
+MAIN='org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.DcaeControllerServiceStandardeventcollectorManagerServer'
+ACTION='start'
+
+WORKDIR='/opt/app/manager'
+LOGS="${WORKDIR}/logs"
+
+[ ! -d "$LOGS" ] && mkdir -p "$LOGS"
+
+echo 10.0.4.102 $(hostname).dcae.simpledemo.openecomp.org >> /etc/hosts
+
+exec java -cp ./config:./lib:./lib/*:./bin "${MAIN}" "${ACTION}" \
+ > logs/manager.out 2>logs/manager.err
+EOF
+
+chmod 775 "${DCM_DIR}/start-manager.sh"
+
+
+#
+# generate docker file
+#
+cat <<EOF > "${STAGE}/Dockerfile"
+FROM ubuntu:14.04
+
+MAINTAINER dcae@lists.openecomp.org
+
+WORKDIR /opt/app/manager
+
+ENV HOME /opt/app/SEC
+ENV JAVA_HOME /usr
+
+RUN apt-get update && apt-get install -y \
+ bc \
+ curl \
+ telnet \
+ vim \
+ netcat \
+ openjdk-7-jdk
+
+COPY opt /opt
+
+EXPOSE 9999
+
+CMD [ '/opt/app/manager/start-manager.sh' ]
+EOF
+
+#
+# build the docker image. tag and then push to the remote repo
+#
+IMAGE='dcae-controller-common-event'
+TAG='1.0.0'
+LFQI="${IMAGE}:${TAG}"
+BUILD_PATH="${WORKSPACE}/target/stage"
+
+# build a docker image
+docker build --rm -t "${LFQI}" "${BUILD_PATH}"
+
+
+#
+# push the image
+#
+# io registry DOCKER_REPOSITORIES="nexus3.openecomp.org:10001 \
+# release registry nexus3.openecomp.org:10002 \
+# snapshot registry nexus3.openecomp.org:10003"
+REPO='nexus3.openecomp.org:10003'
+
+if [ ! -z "$REPO" ]; then
+ RFQI="${REPO}/${LFQI}"
+ # tag
+ docker tag "${LFQI}" "${RFQI}"
+
+ # push to remote repo
+ docker push "${RFQI}"
+fi \ No newline at end of file
diff --git a/jjb/dcae/script-collectors-ves-verify.sh b/jjb/dcae/script-collectors-ves-verify.sh
new file mode 100755
index 000000000..b39efbe8f
--- /dev/null
+++ b/jjb/dcae/script-collectors-ves-verify.sh
@@ -0,0 +1,114 @@
+#!/bin/bash
+#
+#
+# 1 fetch DCAE Controller service manager
+# 2 build the docker imagei with both service manager and ves collector
+# 3 tag and then push to the remote repo
+#
+#
+# !!! make sure the yaml jjb file includes docker-login as a builder
+# before calling this script
+
+
+# io registry DOCKER_REPOSITORIES="nexus3.openecomp.org:10001 \
+# release registry nexus3.openecomp.org:10002 \
+# snapshot registry nexus3.openecomp.org:10003"
+
+
+
+# downloading DCAE Controller service manager for VES collector
+GROUP_ID='org.openecomp.dcae.controller'
+ARTIFACT_ID='dcae-controller-service-standardeventcollector-manager'
+VERSION='0.1.0-SNAPSHOT'
+FORMAT='zip'
+SCOPE='runtime'
+ARTIFACT_FQID="${GROUP_ID}:${ARTIFACT_ID}:${VERSION}:${FORMAT}:${SCOPE}"
+ARTIFACT_FILENAME="${ARTIFACT_ID}-${VERSION}-${SCOPE}.${FORMAT}"
+mvn -s "$SETTINGS_FILE" \
+ org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \
+ -Dartifact="${ARTIFACT_FQID}" -DoutputDirectory=/tmp
+DCM_AR="/tmp/${ARTIFACT_FILENAME}"
+if [ ! -f "${DCM_AR}" ]
+then
+ echo "FATAL error cannot locate ${DCM_AR}"
+ exit 2
+fi
+
+# unarchive the service manager
+TARGET="${WORKSPACE}/target"
+STAGE="${TARGET}/stage"
+DCM_DIR="${STAGE}/opt/app/manager"
+[ ! -d "${DCM_DIR}" ] && mkdir -p "${DCM_DIR}"
+unzip -qo -d "${DCM_DIR}" "${DCM_AR}"
+
+#
+# generate the manager start-up.sh
+#
+[ -f "${DCM_DIR}/start-manager.sh" ] && exit 0
+
+cat <<EOF > "${DCM_DIR}/start-manager.sh"
+#!/bin/bash
+
+MAIN='org.openecomp.dcae.controller.service.standardeventcollector.servers.manager.DcaeControllerServiceStandardeventcollectorManagerServer'
+ACTION='start'
+
+WORKDIR='/opt/app/manager'
+LOGS="${WORKDIR}/logs"
+
+[ ! -d "$LOGS" ] && mkdir -p "$LOGS"
+
+echo 10.0.4.102 $(hostname).dcae.simpledemo.openecomp.org >> /etc/hosts
+
+exec java -cp ./config:./lib:./lib/*:./bin "${MAIN}" "${ACTION}" \
+ > logs/manager.out 2>logs/manager.err
+EOF
+
+chmod 775 "${DCM_DIR}/start-manager.sh"
+
+
+#
+# generate docker file
+#
+cat <<EOF > "${STAGE}/Dockerfile"
+FROM ubuntu:14.04
+
+MAINTAINER dcae@lists.openecomp.org
+
+WORKDIR /opt/app/manager
+
+ENV HOME /opt/app/SEC
+ENV JAVA_HOME /usr
+
+RUN apt-get update && apt-get install -y \
+ bc \
+ curl \
+ telnet \
+ vim \
+ netcat \
+ openjdk-7-jdk
+
+COPY opt /opt
+
+EXPOSE 9999
+
+CMD [ '/opt/app/manager/start-manager.sh' ]
+EOF
+
+#
+# build the docker image. tag and then push to the remote repo
+#
+IMAGE='dcae-controller-common-event'
+TAG='1.0.0'
+LFQI="${IMAGE}:${TAG}"
+BUILD_PATH="${WORKSPACE}/target/stage"
+
+# build a docker image
+docker build --rm -t "${LFQI}" "${BUILD_PATH}"
+
+
+#
+# push the image
+#
+# io registry DOCKER_REPOSITORIES="nexus3.openecomp.org:10001 \
+# release registry nexus3.openecomp.org:10002 \
+# snapshot registry nexus3.openecomp.org:10003" \ No newline at end of file
diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml
index a84a7d08c..7b173e9ba 100644
--- a/jjb/global-templates-java.yaml
+++ b/jjb/global-templates-java.yaml
@@ -644,3 +644,68 @@
global-settings-type: cfp
- shell: '{script}'
+
+- job-template:
+ name: '{project-name}-{stream}-aai-docker-java-daily'
+ project-type: freestyle
+ node: 'ubuntu1604-docker-8c-8g'
+
+ properties:
+ - ecomp-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+
+ parameters:
+ - ecomp-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ artifacts: '{archive-artifacts}'
+
+ scm:
+ - gerrit-trigger-scm:
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - ecomp-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ # 12 AM UTC
+ - timed: 'H 12 * * *'
+ - gerrit-trigger-release-manually:
+ server: '{server-name}'
+ project: '{project}'
+ branch: '{branch}'
+
+ builders:
+
+ - provide-maven-settings:
+ global-settings-file: 'global-settings'
+ settings-file: '{mvn-settings}'
+
+ - docker-login
+
+ - maven-target:
+ maven-version: 'mvn33'
+ pom: 'pom.xml'
+ goals: 'clean install -DskipTests'
+ settings: '{mvn-settings}'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+
+ - maven-target:
+ maven-version: 'mvn33'
+ pom: '{pom}'
+ goals: '{mvn-goals}'
+ settings: '{mvn-settings}'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+ properties:
+ - maven.test.skip=true
+ - docker.pull.registry=nexus3.openecomp.org:10001
+ - docker.push.registry=nexus3.openecomp.org:10003
+
+ - shell: !include-raw: include-docker-push.sh
diff --git a/jjb/include-docker-push.sh b/jjb/include-docker-push.sh
new file mode 100644
index 000000000..1017d549c
--- /dev/null
+++ b/jjb/include-docker-push.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+DOCKER_REPOSITORY="nexus3.openecomp.org:10003"
+SEARCH="aai-service";
+
+if [[ $PROJECT =~ $SEARCH ]] ; then
+ docker push $DOCKER_REPOSITORY/ecomp/ajsc-aai:latest;
+else
+ docker push $DOCKER_REPOSITORY/ecomp/model-loader:latest;
+fi
diff --git a/jjb/policy/include-raw-docker-verify.sh b/jjb/policy/include-raw-docker-verify.sh
new file mode 100644
index 000000000..d1943ba7c
--- /dev/null
+++ b/jjb/policy/include-raw-docker-verify.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+echo '============== STARTING SCRIPT TO BUILD DOCKER IMAGES ================='
+
+
+DOCKER_REPOSITORY=nexus3.openecomp.org:10003
+
+for image in policy-os policy-nexus policy-db policy-base policy-drools policy-pe ; do
+ echo "Building $image"
+ mkdir -p target/$image
+ cp $image/* target/$image
+done
diff --git a/jjb/policy/policy-docker.yaml b/jjb/policy/policy-docker.yaml
index 71879f16c..4489304ef 100644
--- a/jjb/policy/policy-docker.yaml
+++ b/jjb/policy/policy-docker.yaml
@@ -3,6 +3,13 @@
name: policy-docker
project-name: 'policy-docker-policy'
jobs:
+ - '{project-name}-{stream}-verify-script':
+ script:
+ !include-raw-escape: 'include-raw-docker-verify.sh'
+ - '{project-name}-{stream}-merge-scm-mvn-script':
+ mvn-goals: '--version'
+ script:
+ !include-raw-escape: 'include-raw-docker-verify.sh'
- '{project-name}-{stream}-docker-java-shell-daily':
docker-pom: 'pom.xml'
mvn-goals: 'prepare-package'