diff options
-rw-r--r-- | jjb/aai/aai-champ.yaml | 3 | ||||
-rw-r--r-- | jjb/aai/aai-gizmo.yaml | 2 | ||||
-rw-r--r-- | jjb/appc/appc-cdt.yaml | 1 | ||||
-rw-r--r-- | jjb/ci-management/ci-management-packer-jobs.yaml | 18 | ||||
-rw-r--r-- | jjb/multicloud/multicloud-openstack-ocata-csit.yaml | 3 | ||||
-rwxr-xr-x | jjb/openci/create-ape.sh | 29 | ||||
-rw-r--r-- | jjb/openci/openci-onap-daily-jobs.yaml | 103 | ||||
-rw-r--r-- | jjb/policy/policy-parent.yaml | 17 | ||||
-rw-r--r-- | jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml | 1 | ||||
-rw-r--r-- | jjb/vnfsdk/vnfsdk-ice-python.yaml | 1 | ||||
-rw-r--r-- | jjb/vnfsdk/vnfsdk-pkgtools-python.yaml | 1 | ||||
-rw-r--r-- | jjb/vvp/vvp-documentation.yaml | 2 | ||||
-rw-r--r-- | packer/provision/helm.yaml | 39 | ||||
-rw-r--r-- | packer/templates/helm.json | 64 |
14 files changed, 281 insertions, 3 deletions
diff --git a/jjb/aai/aai-champ.yaml b/jjb/aai/aai-champ.yaml index 40fcae0df..0b8dba9cc 100644 --- a/jjb/aai/aai-champ.yaml +++ b/jjb/aai/aai-champ.yaml @@ -6,11 +6,10 @@ - gerrit-maven-clm - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version-java-daily' - '{project-name}-{stream}-aai-docker-java-daily': pom: 'champ-service/pom.xml' mvn-goals: 'docker:build' - - '{project-name}-{stream}-release-version-java-daily' project: 'aai/champ' stream: - 'master': diff --git a/jjb/aai/aai-gizmo.yaml b/jjb/aai/aai-gizmo.yaml index be73ff987..a8e4f1360 100644 --- a/jjb/aai/aai-gizmo.yaml +++ b/jjb/aai/aai-gizmo.yaml @@ -6,7 +6,7 @@ - gerrit-maven-clm - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-java-daily' + - '{project-name}-{stream}-release-version-java-daily' - '{project-name}-{stream}-aai-docker-java-daily': pom: 'pom.xml' mvn-goals: 'docker:build' diff --git a/jjb/appc/appc-cdt.yaml b/jjb/appc/appc-cdt.yaml index ea973d3cb..be7e1f71a 100644 --- a/jjb/appc/appc-cdt.yaml +++ b/jjb/appc/appc-cdt.yaml @@ -6,6 +6,7 @@ - gerrit-maven-clm - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' + - '{project-name}-{stream}-release-version-java-daily' project: 'appc/cdt' stream: diff --git a/jjb/ci-management/ci-management-packer-jobs.yaml b/jjb/ci-management/ci-management-packer-jobs.yaml index f78186112..055ae1b67 100644 --- a/jjb/ci-management/ci-management-packer-jobs.yaml +++ b/jjb/ci-management/ci-management-packer-jobs.yaml @@ -69,3 +69,21 @@ - centos-7 - ubuntu-16.04 templates: redis + +- project: + name: packer-helm-jobs + jobs: + - gerrit-packer-merge + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: '**/*.log' + + build-node: centos7-builder-2c-1g + + platforms: + - centos-7 + - ubuntu-16.04 + templates: helm + diff --git a/jjb/multicloud/multicloud-openstack-ocata-csit.yaml b/jjb/multicloud/multicloud-openstack-ocata-csit.yaml index dfef6f81a..e60ab6301 100644 --- a/jjb/multicloud/multicloud-openstack-ocata-csit.yaml +++ b/jjb/multicloud/multicloud-openstack-ocata-csit.yaml @@ -10,5 +10,8 @@ - 'functionality1': trigger_jobs: - 'multicloud-openstack-master-docker-java-version-shell-daily' + - 'hpa-discovery': + trigger_jobs: + - 'multicloud-openstack-master-docker-java-version-shell-daily' robot-options: '' branch: 'master' diff --git a/jjb/openci/create-ape.sh b/jjb/openci/create-ape.sh new file mode 100755 index 000000000..3a4c8afaf --- /dev/null +++ b/jjb/openci/create-ape.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 Ericsson AB and others. +# 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 + +# This script creates ArtifactPublishedEvent (APE) +# The JMS Messaging Plugin doesn't handle the newlines well so the eventBody is +# constructed on a single line. This is something that needs to be fixed properly + +cat << EOF > $WORKSPACE/event.properties +type=$PUBLISH_EVENT_TYPE +origin=$PUBLISH_EVENT_ORIGIN +eventBody="{ 'type': '$PUBLISH_EVENT_TYPE', 'id': '$(uuidgen)', \ +'time': '$(date -u +%Y-%m-%d_%H:%M:%SUTC)', 'origin': '$PUBLISH_EVENT_ORIGIN', \ +'buildUrl': '$BUILD_URL', 'branch': 'master', 'artifactLocation': '$ARTIFACT_LOCATION', \ +'confidenceLevel': { $CONFIDENCE_LEVEL } }" +EOF +echo "Constructed $PUBLISH_EVENT_TYPE" +echo "--------------------------------------------" +cat $WORKSPACE/event.properties +echo "--------------------------------------------" diff --git a/jjb/openci/openci-onap-daily-jobs.yaml b/jjb/openci/openci-onap-daily-jobs.yaml new file mode 100644 index 000000000..d328e2530 --- /dev/null +++ b/jjb/openci/openci-onap-daily-jobs.yaml @@ -0,0 +1,103 @@ +--- +- project: + name: openci-onap + + project: '{name}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + + jobs: + - 'openci-onap-autorelease-daily-{stream}' + - 'openci-onap-promote-daily-{stream}' + +# This job gets triggered manually for the demo purposes. +# +# In prototype, either what this job does needs to be integrated to +# ONAP autorelease job or triggered by the upstream autorelease job. +- job-template: + name: 'openci-onap-autorelease-daily-{stream}' + + disabled: '{obj:disabled}' + + concurrent: false + + build-node: ubuntu1604-builder-4c-4g + + parameters: + - string: + name: PUBLISH_EVENT_TYPE + default: ArtifactPublishedEvent + description: 'The type of the event this job publishes' + - string: + name: PUBLISH_EVENT_ORIGIN + default: ONAP + description: 'Originating community' + - string: + name: ARTIFACT_LOCATION + default: https://url/to/artifact/on/onap/nexus/$BUILD_NUMBER + description: 'The location of the artifact on ONAP Nexus' + - string: + name: CONFIDENCE_LEVEL + default: "'autorelease': 'SUCCESS'" + description: 'The confidence level the published artifact gained' + + builders: + # first build step in the job executes create-ape.sh to construct the + # ArtifactPublishedEvent (ape) + - shell: + !include-raw-escape: ./create-ape.sh + # constructed event gets injected into environment so JME Messaging + # plugin can publish the event and its properties in post-build step + - inject: + properties-file: "$WORKSPACE/event.properties" + + publishers: + - jms-messaging: + provider-name: openci.activemq + msg-type: Custom + msg-props: | + type=$type + origin=$origin + msg-content: + $eventBody + +# This job gets triggered by a ConfidenceLevelModifiedEvent published +# by OPNFV jobs so ONAP can promote the autorelease artifact even further. +# +# This job is created for the demo purposes and might not be there for +# the prototype. +- job-template: + name: 'openci-onap-promote-daily-{stream}' + + disabled: '{obj:disabled}' + + concurrent: false + + build-node: ubuntu1604-builder-4c-4g + + triggers: + - jms-messaging: + provider-name: openci.activemq + selector: CI_TYPE = 'custom' + checks: + - field: origin + expected-value: 'OPNFV' + - field: type + expected-value: 'ConfidenceLevelModifiedEvent' + - field: scenario + expected-value: 'k8-nosdn-onap' + + builders: + - shell: | + #!/bin/bash + + echo + echo "Triggered by $type" + echo "----------------------------------" + echo $CI_MESSAGE + echo "----------------------------------" + echo " Promoted ONAP Autorelease artifact as release candidate!" diff --git a/jjb/policy/policy-parent.yaml b/jjb/policy/policy-parent.yaml new file mode 100644 index 000000000..5ed2a1f42 --- /dev/null +++ b/jjb/policy/policy-parent.yaml @@ -0,0 +1,17 @@ +--- +- project: + name: policy-parent + project-name: 'policy-parent' + jobs: + - gerrit-maven-clm: + - '{project-name}-{stream}-verify-java' + - '{project-name}-{stream}-merge-java' + + project: 'policy/parent' + stream: + - 'master': + branch: 'master' + mvn-settings: 'policy-parent-settings' + files: '**' + archive-artifacts: '' + build-node: ubuntu1604-builder-4c-4g diff --git a/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml b/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml index a9b0c7c66..9a736da1a 100644 --- a/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml +++ b/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml @@ -21,6 +21,7 @@ - '{project-name}-{stream}-{subproject}-verify-python' - '{project-name}-{stream}-{subproject}-merge-java' - '{project-name}-{subproject}-python-staging-{stream}' + - '{project-name}-{subproject}-python-release-{stream}' - '{project-name}-{stream}-docker-java-daily': docker-pom: 'pom.xml' mvn-profile: 'docker' diff --git a/jjb/vnfsdk/vnfsdk-ice-python.yaml b/jjb/vnfsdk/vnfsdk-ice-python.yaml index c9ea5ff18..a3ad7d348 100644 --- a/jjb/vnfsdk/vnfsdk-ice-python.yaml +++ b/jjb/vnfsdk/vnfsdk-ice-python.yaml @@ -28,6 +28,7 @@ - '{project-name}-{stream}-{subproject}-verify-python' - '{project-name}-{stream}-{subproject}-merge-java' - '{project-name}-{subproject}-python-staging-{stream}' + - '{project-name}-{subproject}-python-release-{stream}' - project: name: vnfsdk-ice-docker project-name: 'vnfsdk-ice-docker' diff --git a/jjb/vnfsdk/vnfsdk-pkgtools-python.yaml b/jjb/vnfsdk/vnfsdk-pkgtools-python.yaml index e68ea1d7e..a0480d120 100644 --- a/jjb/vnfsdk/vnfsdk-pkgtools-python.yaml +++ b/jjb/vnfsdk/vnfsdk-pkgtools-python.yaml @@ -19,6 +19,7 @@ - gerrit-python-xc-clm - '{project-name}-{stream}-{subproject}-verify-python' - '{project-name}-{subproject}-python-staging-{stream}' + - '{project-name}-{subproject}-python-release-{stream}' - project: name: vnfsdk-pkgtools-tox-sonar jobs: diff --git a/jjb/vvp/vvp-documentation.yaml b/jjb/vvp/vvp-documentation.yaml index 421123e70..d5b2a3c13 100644 --- a/jjb/vvp/vvp-documentation.yaml +++ b/jjb/vvp/vvp-documentation.yaml @@ -3,6 +3,7 @@ name: vvp-documentation project-name: 'vvp-documentation' project: 'vvp/documentation' + rtdproject: 'onap' stream: - 'master': branch: 'master' @@ -10,3 +11,4 @@ build-node: ubuntu1604-builder-4c-4g jobs: - gerrit-python-xc-clm + - gerrit-tox-verify diff --git a/packer/provision/helm.yaml b/packer/provision/helm.yaml new file mode 100644 index 000000000..68291114e --- /dev/null +++ b/packer/provision/helm.yaml @@ -0,0 +1,39 @@ +--- +- import_playbook: ../common-packer/provision/baseline.yaml + +- hosts: all + become_user: root + become_method: sudo + + vars: + kubectl_version: 1.8.6 + helm_version: 2.6.1 + + tasks: + - name: 'Install kubectl {{kubectl_version}}' + get_url: + url: https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl + dest: /usr/local/bin/kubectl + mode: 0775 + become: yes + + - name: 'Install Helm {{helm_version}}' + block: + - name: 'Fetch tar.gz' + get_url: + url: http://storage.googleapis.com/kubernetes-helm/helm-v{{helm_version}}-linux-amd64.tar.gz + dest: /tmp/helm-v{{helm_version}}-linux-amd64.tar.gz + - name: 'Unarchive' + unarchive: + src: /tmp/helm-v{{helm_version}}-linux-amd64.tar.gz + dest: /tmp + remote_src: true + become: yes + - name: 'Move helm to /usr/local/bin and set as executable' + command: 'mv /tmp/linux-amd64/helm /usr/local/bin/helm' + become: yes + - name: 'Check helm.' + command: 'which helm' + - name: 'Check kubectl.' + command: 'which kubectl' + diff --git a/packer/templates/helm.json b/packer/templates/helm.json new file mode 100644 index 000000000..b34ce9f83 --- /dev/null +++ b/packer/templates/helm.json @@ -0,0 +1,64 @@ +{ + "variables": { + "ansible_roles_path": ".galaxy", + "base_image": null, + "distro": null, + "cloud_auth_url": null, + "cloud_user": null, + "cloud_pass": null, + "cloud_network": null, + "cloud_tenant": null, + "cloud_user_data": null, + "ssh_user": null, + "ssh_proxy_host": "" + }, + "builders": [ + { + "name": "vexxhost", + "image_name": "ZZCI - {{user `distro`}} - helm - {{isotime \"20060102-1504\"}}", + "source_image_name": "{{user `base_image`}}", + "type": "openstack", + "identity_endpoint": "{{user `cloud_auth_url`}}", + "username": "{{user `cloud_user`}}", + "password": "{{user `cloud_pass`}}", + "tenant_name": "{{user `cloud_tenant`}}", + "domain_name": "Default", + "region": "ca-ymq-1", + "availability_zone": "ca-ymq-2", + "networks": [ + "{{user `cloud_network`}}" + ], + "user_data_file": "{{user `cloud_user_data`}}", + "ssh_username": "{{user `ssh_user`}}", + "ssh_proxy_host": "{{user `ssh_proxy_host`}}", + "flavor": "v1-standard-1", + "metadata": { + "ci_managed": "yes" + } + } + ], + "provisioners": [ + { + "type": "shell", + "scripts": [ + "common-packer/provision/install-python.sh" + ], + "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" + }, + { + "type": "shell-local", + "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}" + }, + { + "type": "ansible", + "playbook_file": "provision/helm.yaml", + "ansible_env_vars": [ + "ANSIBLE_NOCOWS=1", + "ANSIBLE_PIPELINING=True", + "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}", + "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", + "ANSIBLE_STDOUT_CALLBACK=debug" + ] + } + ] +} |