diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/aai/aai-aai-service.yaml | 2 | ||||
-rw-r--r-- | jjb/aai/aai-model-loader.yaml | 2 | ||||
-rw-r--r-- | jjb/dcae/collectors-ves.yaml | 2 | ||||
-rw-r--r-- | jjb/dcae/dcae-demo.yaml | 6 | ||||
-rw-r--r-- | jjb/dcae/dcae-inventory.yaml | 1 | ||||
-rw-r--r-- | jjb/demo/demo.yaml | 1 | ||||
-rw-r--r-- | jjb/global-templates-script.yaml | 69 | ||||
-rw-r--r-- | jjb/include-docker-push.sh | 24 |
8 files changed, 98 insertions, 9 deletions
diff --git a/jjb/aai/aai-aai-service.yaml b/jjb/aai/aai-aai-service.yaml index 5ce2a2ef6..342381324 100644 --- a/jjb/aai/aai-aai-service.yaml +++ b/jjb/aai/aai-aai-service.yaml @@ -8,7 +8,7 @@ - '{project-name}-{stream}-release-java-daily' - '{project-name}-{stream}-aai-docker-java-daily': pom: 'ajsc-aai/pom.xml' - mvn-goals: 'docker:build docker:push' + mvn-goals: 'docker:build' project: 'aai/aai-service' stream: diff --git a/jjb/aai/aai-model-loader.yaml b/jjb/aai/aai-model-loader.yaml index 7b94c61b2..6e344dc2b 100644 --- a/jjb/aai/aai-model-loader.yaml +++ b/jjb/aai/aai-model-loader.yaml @@ -8,7 +8,7 @@ - '{project-name}-{stream}-release-java-daily' - '{project-name}-{stream}-aai-docker-java-daily': pom: 'pom.xml' - mvn-goals: 'docker:build docker:push' + mvn-goals: 'docker:build' project: 'aai/model-loader' stream: - 'master': diff --git a/jjb/dcae/collectors-ves.yaml b/jjb/dcae/collectors-ves.yaml index 0ed3ed143..3c4a541a1 100644 --- a/jjb/dcae/collectors-ves.yaml +++ b/jjb/dcae/collectors-ves.yaml @@ -24,7 +24,7 @@ # job specific mvn-goals-versioning: # yamllint disable rule:line-length - 'versions:set versions:update-child-modules versions:commit -D1.0.0-SNAPSHOT' + 'versions:set versions:update-child-modules versions:commit' # yamllint enable mvn-goals: 'clean deploy' maven-deploy-properties: | diff --git a/jjb/dcae/dcae-demo.yaml b/jjb/dcae/dcae-demo.yaml index cb9039f70..ff1ce9661 100644 --- a/jjb/dcae/dcae-demo.yaml +++ b/jjb/dcae/dcae-demo.yaml @@ -11,16 +11,14 @@ files: '**' archive-artifacts: '' build-node: ubuntu1604-docker-8c-8g - mvn-goals: '--version' mvn-goals-versioning: '--version' jobs: - - '{project-name}-{stream}-daily-release-scm-mvn-script': - mvn-goals: 'clean deploy' + - '{project-name}-{stream}-daily-release-version2-scm-mvn-script': + mvn-goals: 'clean install' maven-deploy-properties: | deployAtEnd=true # yamllint disable rule:line-length script: | - bash update-version.sh bash dcae-demo-controller/src/main/docker-build/build.sh bash dcae-demo-controller/src/main/docker-build/push.sh nexus3.openecomp.org:10003 # yamllint enable diff --git a/jjb/dcae/dcae-inventory.yaml b/jjb/dcae/dcae-inventory.yaml index 6513dafe0..7414f82a0 100644 --- a/jjb/dcae/dcae-inventory.yaml +++ b/jjb/dcae/dcae-inventory.yaml @@ -16,3 +16,4 @@ mvn-settings: 'dcae-dcae-inventory-settings' files: '**' archive-artifacts: '' + build-node: 'ubuntu1604-docker-8c-8g' diff --git a/jjb/demo/demo.yaml b/jjb/demo/demo.yaml index 47fa0a8ce..f4b3dba4f 100644 --- a/jjb/demo/demo.yaml +++ b/jjb/demo/demo.yaml @@ -6,6 +6,7 @@ jobs: - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' + - '{project-name}-{stream}-release-version-java-daily' project: 'demo' stream: diff --git a/jjb/global-templates-script.yaml b/jjb/global-templates-script.yaml index 3932d07d2..83f4fe6a2 100644 --- a/jjb/global-templates-script.yaml +++ b/jjb/global-templates-script.yaml @@ -198,6 +198,75 @@ - docker-login - shell: '{script}' +- job-template: + # Job template for daily-release a submission. triggered on timer, does + # scm mvn with passed-in goals, then run script. + # Version changed using include-update-pom-versions.sh script + # + # Required Variables: + # branch: git branch + # script: build script to execute + # mvn-goals: space separated list of maven build goals (--version for + # noop, or clean deploy) + name: '{project-name}-{stream}-daily-release-version2-scm-mvn-script' + + project-type: freestyle + concurrent: true + 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}' + - maven-exec: + maven-version: '{maven-version}' + + scm: + - gerrit-trigger-scm: + refspec: '' + choosing-strategy: 'default' + + wrappers: + - ecomp-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + # 11 AM UTC + - timed: 'H 11 * * *' + - gerrit-trigger-release-manually: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + + builders: + - provide-maven-settings: + global-settings-file: 'global-settings' + settings-file: '{mvn-settings}' + + - inject: + properties-file: version.properties + + - shell: !include-raw-escape: include-update-pom-versions.sh + + - maven-target: + maven-version: '{maven-version}' + goals: '{mvn-goals}' + properties: + - '{maven-deploy-properties}' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - docker-login + - shell: '{script}' + + - job-template: # Job template for verifying a submission. triggered on diff --git a/jjb/include-docker-push.sh b/jjb/include-docker-push.sh index 929b6a25f..30aa32d7a 100644 --- a/jjb/include-docker-push.sh +++ b/jjb/include-docker-push.sh @@ -2,11 +2,31 @@ DOCKER_REPOSITORY="nexus3.openecomp.org:10003" SEARCH="aai-service"; +DATETIME_STAMP=$(date +%Y%m%dT%H%M%S); +VERSION=1.0.0; +SNAPSHOT_TAG=${VERSION}-SNAPSHOT-${DATETIME_STAMP}; +STAGING_TAG=${VERSION}-STAGING-${DATETIME_STAMP}; if [[ $PROJECT =~ $SEARCH ]] ; then - docker push $DOCKER_REPOSITORY/openecomp/ajsc-aai:latest; + + REPO_PATH=$DOCKER_REPOSITORY/openecomp/ajsc-aai; + + docker tag $REPO_PATH:latest $REPO_PATH:$STAGING_TAG; + docker tag $REPO_PATH:latest $REPO_PATH:$SNAPSHOT_TAG; + + docker push $REPO_PATH:latest; + docker push $REPO_PATH:$STAGING_TAG; + docker push $REPO_PATH:$SNAPSHOT_TAG; else # Cut the prefix aai/ in example aai/model-loader DOCKER_REPO_NAME=$(echo ${PROJECT} | cut -d"/" -f2-); - docker push $DOCKER_REPOSITORY/openecomp/${DOCKER_REPO_NAME}:latest; + + REPO_PATH=$DOCKER_REPOSITORY/openecomp/${DOCKER_REPO_NAME}; + + docker tag $REPO_PATH:latest $REPO_PATH:$STAGING_TAG; + docker tag $REPO_PATH:latest $REPO_PATH:$SNAPSHOT_TAG; + + docker push $REPO_PATH:latest; + docker push $REPO_PATH:$SNAPSHOT_TAG; + docker push $REPO_PATH:$STAGING_TAG; fi |