From: Eric Ball Date: Fri, 8 May 2020 21:10:09 +0000 (+0000) Subject: Merge "Add signing to Akraino deploy templates" X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=f3676935f6c18da1a1748251781d8cb30ac2acfa;hp=0904fdd5e0e3b113ee90e77c646a7f156d878762 Merge "Add signing to Akraino deploy templates" --- diff --git a/jenkins-config/clouds/openstack/cattle/cloud.cfg b/jenkins-config/clouds/openstack/cattle/cloud.cfg index e632f1f..f0d234d 100644 --- a/jenkins-config/clouds/openstack/cattle/cloud.cfg +++ b/jenkins-config/clouds/openstack/cattle/cloud.cfg @@ -1,6 +1,6 @@ # Cloud Configuration CLOUD_CREDENTIAL_ID=os-cloud -CLOUD_URL=https://auth.vexxhost.net/v3/ +CLOUD_URL=https://auth.vexxhost.net/v3 CLOUD_IGNORE_SSL=false CLOUD_ZONE=ca-ymq-1 diff --git a/jjb/5g-mec-cloud-gaming/5g-mec-cloud-gaming.yaml b/jjb/5g-mec-cloud-gaming/5g-mec-cloud-gaming.yaml new file mode 100644 index 0000000..ba84140 --- /dev/null +++ b/jjb/5g-mec-cloud-gaming/5g-mec-cloud-gaming.yaml @@ -0,0 +1,14 @@ +--- +- project: + name: 5g-mec-cloud-gaming-project-view + project-name: 5g-mec-cloud-gaming + views: + - project-view + +- project: + name: 5g-mec-cloud-gaming-info + project: 5g-mec-cloud-gaming + project-name: 5g-mec-cloud-gaming + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify diff --git a/jjb/akraino-templates/akraino-iec-macros.yaml b/jjb/akraino-templates/akraino-iec-macros.yaml index 4bd825a..4db8f3a 100644 --- a/jjb/akraino-templates/akraino-iec-macros.yaml +++ b/jjb/akraino-templates/akraino-iec-macros.yaml @@ -87,6 +87,31 @@ name: PON_TYPE default: 'ponsim' +######################## +# publisher macros +######################## +- publisher: + name: 'iec-default-publisher' + publishers: + - email: + recipients: armband@enea.com + - lf-infra-publish + +- publisher: + name: 'iec-install-usecase-publisher' + publishers: + - iec-default-publisher + +- publisher: + name: 'iec-test-usecase-publisher' + publishers: + - iec-default-publisher + - robot: + output-path: 'results' + report-html: '**/report.html' + log-html: '**/log.html' + output-xml: '**/output.xml' + ######################## # trigger macros ######################## diff --git a/jjb/akraino-templates/akraino-iec-templates.yaml b/jjb/akraino-templates/akraino-iec-templates.yaml index 640923f..ec2d46e 100644 --- a/jjb/akraino-templates/akraino-iec-templates.yaml +++ b/jjb/akraino-templates/akraino-iec-templates.yaml @@ -79,7 +79,11 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' - - project: 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' + - project: + !j2: | + {%- if deploy_type in ['virtual'] -%} + iec-{{ iecType }}-destroy-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }} + {%- endif -%} current-parameters: false predefined-parameters: | DEPLOY_SCENARIO={scenario} @@ -160,10 +164,8 @@ - shell: !include-raw-escape: ../iec/iec-fuel-deploy.sh - publishers: &publishers - - email: - recipients: armband@enea.com - - lf-infra-publish + publishers: + - iec-default-publisher - job-template: id: akraino-iec-destroy @@ -197,7 +199,8 @@ - shell: !include-raw-escape: ../iec/iec-{installer}-destroy.sh - publishers: *publishers + publishers: + - iec-default-publisher - job-template: id: akraino-iec-phase-usecase @@ -225,4 +228,5 @@ - shell: !include-raw-escape: ../iec/iec-{usecase}.sh - publishers: *publishers + publishers: + - 'iec-{phase}-usecase-publisher' diff --git a/jjb/ealt-edge/ealt-edge.yaml b/jjb/ealt-edge/ealt-edge.yaml new file mode 100644 index 0000000..4f4df1f --- /dev/null +++ b/jjb/ealt-edge/ealt-edge.yaml @@ -0,0 +1,13 @@ +--- +- project: + name: ealt-edge + project-name: ealt-edge + project: ealt-edge + stream: + - master: + branch: master + build-node: centos7-builder-2c-1g + jobs: + - akraino-project-stream-verify + views: + - project-view diff --git a/jjb/pcei/pcei.yaml b/jjb/pcei/pcei.yaml new file mode 100644 index 0000000..2ac4138 --- /dev/null +++ b/jjb/pcei/pcei.yaml @@ -0,0 +1,14 @@ +--- +- project: + name: pcei-project-view + project-name: pcei + views: + - project-view + +- project: + name: pcei-info + project: pcei + project-name: pcei + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify diff --git a/jjb/shell/run_bluval.sh b/jjb/shell/run_bluval.sh index d850f79..4b306a8 100755 --- a/jjb/shell/run_bluval.sh +++ b/jjb/shell/run_bluval.sh @@ -35,14 +35,16 @@ change_res_owner() { usage() { echo "usage: $0" >&2 - echo "[-n ">&2 - echo "[-b blueprint definition">&2 - echo "[-k k8s config dir">&2 - echo "[-j cluster master IP">&2 - echo "[-u ssh user">&2 - echo "[-s ] path to ssh key">&2 + echo "[-n ]">&2 + echo "[-b ] blueprint definition">&2 + echo "[-k ] k8s config dir">&2 + echo "[-j ] cluster master IP">&2 + echo "[-u ] ssh user">&2 + echo "[-p ] ssh password">&2 + echo "[-s ] path to ssh key">&2 echo "[-c ] path to variables yaml file">&2 echo "[-l ] blueprint layer">&2 + echo "[-P ] pull docker images">&2 echo "[-o ] run optional tests">&2 echo "[-v ] version">&2 } @@ -67,17 +69,18 @@ error () { } # Get options from shell -while getopts "j:k:u:s:b:l:r:n:opv:" optchar; do +while getopts "j:k:u:p:s:b:l:r:n:oPv:" optchar; do case "${optchar}" in j) cluster_master_ip=${OPTARG} ;; k) k8s_config_dir=${OPTARG} ;; + u) sh_user=${OPTARG} ;; + p) ssh_password=${OPTARG} ;; s) ssh_key=${OPTARG} ;; b) blueprint_yaml=${OPTARG} ;; l) blueprint_layer=${OPTARG} ;; n) blueprint_name=${OPTARG} ;; - u) sh_user=${OPTARG} ;; o) is_optional="true" ;; - p) pull="true" ;; + P) pull="true" ;; v) version=${OPTARG} ;; *) echo "Non-option argument: '-${OPTARG}'" >&2 usage @@ -108,6 +111,7 @@ version=${version:-$VERSION} results_dir=$cwd/results cluster_master_ip=${cluster_master_ip:-$CLUSTER_MASTER_IP} ssh_user=${sh_user:-$CLUSTER_SSH_USER} +ssh_password=${ssh_password:-$CLUSTER_SSH_PASSWORD} blueprint_layer=${blueprint_layer:-$LAYER} if [ "$blueprint_layer" == "k8s" ] || [ -z "$blueprint_layer" ] @@ -118,13 +122,13 @@ then error "Please provide valid IP address to access the k8s cluster." fi verify_connectivity "${cluster_master_ip}" - if [[ -n $CLUSTER_SSH_PASSWORD ]] + if [[ -n ${ssh_password} ]] then - sshpass -p "${CLUSTER_SSH_PASSWORD}" scp -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -r\ - "${ssh_user}@${cluster_master_ip}:~/.kube/*" "$k8s_config_dir" + sshpass -p "${ssh_password}" scp -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -r\ + "${ssh_user}@${cluster_master_ip}:~/.kube/config" "$k8s_config_dir" else scp -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i"$ssh_key" -r\ - "${ssh_user}"@"${cluster_master_ip}":~/.kube/* "$k8s_config_dir" + "${ssh_user}"@"${cluster_master_ip}":~/.kube/config "$k8s_config_dir" fi fi @@ -133,6 +137,9 @@ then cp "$blueprint_yaml" ./bluval/ fi +# create ssh_key_dir +mkdir -p "$cwd/ssh_key_dir" + volumes_path="$cwd/bluval/volumes.yaml" # update information in volumes yaml sed -i \ @@ -143,17 +150,19 @@ sed -i \ -e "/results_dir/{n; s@local: ''@local: '$results_dir'@}" \ "$volumes_path" -# create ssh_key_dir -mkdir -p "$cwd/ssh_key_dir" - -# copy ssh_key in ssh_key_dir -cp "$ssh_key" "$cwd/ssh_key_dir/id_rsa" +if [ -n "$ssh_key" ] +then + cp $ssh_key $cwd/ssh_key_dir/id_rsa + ssh_keyfile=/root/.ssh/id_rsa +fi variables_path="$cwd/tests/variables.yaml" # update information in variables yaml sed -i \ -e "s@host: [0-9]*.[0-9]*.[0-9]*.[0-9]*@host: $cluster_master_ip@" \ -e "s@username: [A-Za-z0-9_]* @username: $ssh_user@" \ + -e "s@password: [A-Za-z0-9_]* @password: $ssh_password@" \ + -e "s@ssh_keyfile: [A-Za-z0-9_]* @ssh_keyfile: $ssh_keyfile@" \ "$variables_path" if [[ -n $blueprint_layer ]] @@ -166,7 +175,7 @@ then fi if [ "$pull" == "true" ] || [ "$PULL" == "yes" ] then - options+=" -p" + options+=" -P" fi set +e