diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/dcae/dmaapbc.yaml | 36 | ||||
-rwxr-xr-x | jjb/dcae/script-dmaapbc-daily-release.sh | 34 | ||||
-rwxr-xr-x | jjb/dcae/script-dmaapbc-merge.sh | 30 | ||||
-rwxr-xr-x | jjb/dcae/script-dmaapbc-verify.sh | 19 | ||||
-rw-r--r-- | jjb/global-templates-script.yaml | 67 |
5 files changed, 186 insertions, 0 deletions
diff --git a/jjb/dcae/dmaapbc.yaml b/jjb/dcae/dmaapbc.yaml new file mode 100644 index 000000000..dee2e9568 --- /dev/null +++ b/jjb/dcae/dmaapbc.yaml @@ -0,0 +1,36 @@ +--- + +- project: + name: dcae-dmaapbc + # job template iterators + project-name: 'dcae-dmaapbc' + stream: + - 'master': + branch: 'master' + # apply to all jobs + project: 'dcae/dmaapbc' + mvn-settings: 'dcae-dmaapbc-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': + mvn-goals-versioning: + 'versions:set versions:update-child-modules versions:commit' + mvn-goals: 'clean deploy' + maven-deploy-properties: | + deployAtEnd=true + script: + !include-raw-escape: 'script-dmaapbc-daily-release.sh' + - '{project-name}-{stream}-merge-scm-mvn-script': + mvn-goals: 'clean deploy' + script: + !include-raw-escape: 'script-dmaapbc-merge.sh' + - '{project-name}-{stream}-verify-scm-mvn-script': + mvn-goals: 'clean install' + script: + !include-raw-escape: 'script-dmaapbc-verify.sh' diff --git a/jjb/dcae/script-dmaapbc-daily-release.sh b/jjb/dcae/script-dmaapbc-daily-release.sh new file mode 100755 index 000000000..710a3196d --- /dev/null +++ b/jjb/dcae/script-dmaapbc-daily-release.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Create a debian package and push to remote repo +# +# +# build the docker image. tag and then push to the remote repo +# + +# !!! make sure the yaml file include docker-login as a builder before calling +# this script + +IMAGE="dcae_dmaapbc" +TAG="1.0.0" +LFQI="${IMAGE}:${TAG}" +BUILD_PATH="${WORKSPACE}" + +# build a docker image +docker build --rm -f ${WORKSPACE}/Dockerfile -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" + +RFQI="${REPO}/${LFQI}" +# tag +docker tag ${LFQI} ${RFQI} + +# push to remote repo +docker push ${RFQI} + diff --git a/jjb/dcae/script-dmaapbc-merge.sh b/jjb/dcae/script-dmaapbc-merge.sh new file mode 100755 index 000000000..a80190f10 --- /dev/null +++ b/jjb/dcae/script-dmaapbc-merge.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Create a debian package and push to remote repo +# +# +# build the docker image. tag and then push to the remote repo +# + +# !!! make sure the yaml file include docker-login as a builder before calling +# this script + +IMAGE="dcae_dmaapbc" +TAG="1.0.0" +LFQI="${IMAGE}:${TAG}" +BUILD_PATH="${WORKSPACE}" + +# build a docker image +docker build --rm -f ${WORKSPACE}/Dockerfile -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:10002" +RFQI="${REPO}/${LFQI}" +docker tag ${LFQI} ${RFQI} +docker push ${RFQI} + diff --git a/jjb/dcae/script-dmaapbc-verify.sh b/jjb/dcae/script-dmaapbc-verify.sh new file mode 100755 index 000000000..8db2c9c74 --- /dev/null +++ b/jjb/dcae/script-dmaapbc-verify.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Create a debian package and push to remote repo +# +# +# build the docker image. tag and then push to the remote repo +# + +# !!! make sure the yaml file include docker-login as a builder before calling +# this script + +IMAGE="dcae_dmaapbc" +TAG="1.0.0" +LFQI="${IMAGE}:${TAG}" +BUILD_PATH="${WORKSPACE}" + +# build a docker image +docker build --rm -f ${WORKSPACE}/Dockerfile -t ${LFQI} ${BUILD_PATH} + + diff --git a/jjb/global-templates-script.yaml b/jjb/global-templates-script.yaml index 3f1f20047..addfde830 100644 --- a/jjb/global-templates-script.yaml +++ b/jjb/global-templates-script.yaml @@ -623,3 +623,70 @@ # publishers: # - ecomp-infra-shiplogs: # maven-version: 'mvn33' + +# vim: sw=2 ts=2 sts=2 et : + +- job-template: + # Job template for scm and script trigger - for docker merge + # + # Required Variables: + # branch: git branch + # build-node: what build node to run on + # script: build script to execute + + name: '{project-name}-{stream}-merge-docker-script' + + project-type: freestyle + concurrent: true + node: '{build-node}' + + 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}' + - maven-exec: + maven-version: 'mvn33' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + + wrappers: + - ecomp-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - reverse: + jobs: '{dependencies}' + result: 'success' + - gerrit-trigger-patch-merged: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '**' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + - docker-login + # make sure maven gets installed / setup + - maven-target: + maven-version: 'mvn33' + goals: '--version' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: '{script}' + +# publishers: +# - ecomp-infra-shiplogs: +# maven-version: 'mvn33'
\ No newline at end of file |