Merge "new job to release docker images"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 9 Mar 2017 16:03:16 +0000 (16:03 +0000)
committerGerrit Code Review <gerrit@openecomp.org>
Thu, 9 Mar 2017 16:03:16 +0000 (16:03 +0000)
1  2 
jjb/global-templates-script.yaml

        - 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
  #    publishers:
  #      - ecomp-infra-shiplogs:
  #          maven-version: '{maven-version}'
+ - job-template:
+     # 1. PULL the desired image
+     # 2. TAG it to the desired release name
+     # 3. PUSH the newly tagged image on release repo
+     name: '{project-name}-docker-image-blessing'
+     project-type: freestyle
+     concurrent: true
+     node: 'ubuntu1604-docker-2c-1g'
+     parameters:
+       - string:
+           name: VERSION
+           description: "VERSION of the STAGING image to bless into this RELEASE VERSION
+             Example : 1.2.3"
+       - string:
+           name: TIMESTAMP
+           description: "TIMESTAMP of the STAGING image to pull
+             Example : 20170308T1332"
+       - string:
+           name: PROJECT
+           default: '{project}'
+     properties:
+       - ecomp-infra-properties:
+           build-days-to-keep: '{build-days-to-keep}'
+     wrappers:
+       - ecomp-infra-wrappers:
+           build-timeout: '{build-timeout}'
+     builders:
+       - provide-maven-settings:
+           global-settings-file: 'global-settings'
+           settings-file: '{mvn-settings}'
+       - docker-login
+       - shell: !include-raw: include-docker-blessing.sh