From: Eric Ball Date: Tue, 26 May 2020 20:51:10 +0000 (+0000) Subject: Merge "validation:Fix jobs cleanup issue with permissions" X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=7299e52f370e413c81b25a24df7c88b9a030a57f;hp=d2cc9862bbdda64d0801dbcc8dad48fb1790bb74 Merge "validation:Fix jobs cleanup issue with permissions" --- diff --git a/jenkins-config/global-vars-production.sh b/jenkins-config/global-vars-production.sh index 0405892..bffb4ef 100644 --- a/jenkins-config/global-vars-production.sh +++ b/jenkins-config/global-vars-production.sh @@ -7,6 +7,7 @@ LOGS_SERVER=https://logs.akraino.org NEXUS_URL=https://nexus.akraino.org REGISTRY_PORTS=10001 10002 10003 10004 RPM_REPO_URL=https://nexus3.akraino.org +S3_BUCKET= SIGUL_BRIDGE_IP=10.30.216.9 SIGUL_KEY=akraino-release-2018 SILO=production diff --git a/jenkins-config/global-vars-sandbox.sh b/jenkins-config/global-vars-sandbox.sh index eda2b9f..b0082f0 100644 --- a/jenkins-config/global-vars-sandbox.sh +++ b/jenkins-config/global-vars-sandbox.sh @@ -6,6 +6,7 @@ LOGS_SERVER=https://logs.akraino.org NEXUS_URL=https://nexus.akraino.org REGISTRY_PORTS=10001 10002 10003 10004 RPM_REPO_URL=https://nexus3.akraino.org +S3_BUCKET= SIGUL_BRIDGE_IP=10.30.216.9 SIGUL_KEY=akraino-sandbox SILO=sandbox diff --git a/jjb/5g-mec-cloud-gaming/5g-mec-cloud-gaming-verify.yaml b/jjb/5g-mec-cloud-gaming/5g-mec-cloud-gaming-verify.yaml index 105b239..68d55d3 100644 --- a/jjb/5g-mec-cloud-gaming/5g-mec-cloud-gaming-verify.yaml +++ b/jjb/5g-mec-cloud-gaming/5g-mec-cloud-gaming-verify.yaml @@ -8,4 +8,4 @@ - master: branch: master jobs: - - akraino-project-stream-verify \ No newline at end of file + - 5g-mec-project-stream-verify diff --git a/jjb/akraino-templates/akraino-5g-mec-templates.yaml b/jjb/akraino-templates/akraino-5g-mec-templates.yaml new file mode 100644 index 0000000..95cbdb0 --- /dev/null +++ b/jjb/akraino-templates/akraino-5g-mec-templates.yaml @@ -0,0 +1,79 @@ +--- +- job-template: + id: 5g-mec-project-stream-verify + name: '{project-name}-{stream}-verify' + archive-artifacts: > + **/*.log + build-days-to-keep: 30 + build-timeout: 60 + stream: master + project-type: freestyle + submodule-recursive: true + node: '{build-node}' + + properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - lf-infra-parameters: + project: '{project}' + stream: '{stream}' + branch: '{branch}' + lftools-version: '{lftools-version}' + + - string: + name: ARCHIVE_ARTIFACTS + default: '{archive-artifacts}' + description: Artifacts to archive to the logs server. + + wrappers: + - lf-infra-wrappers: + build-timeout: '{build-timeout}' + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}/{project}.git' + refspec: '$GERRIT_REFSPEC' + branch: '$GERRIT_BRANCH' + submodule-recursive: '{submodule-recursive}' + submodule-timeout: '{submodule-timeout}' + submodule-disable: false + choosing-strategy: 'gerrit' + + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - change-merged-event + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + - compare-type: REG_EXP + pattern: 'INFO.yaml' + readable-message: true + + builders: + - shell: !include-raw-escape: + - ../shell/verify.sh + + publishers: + - lf-infra-publish diff --git a/jjb/akraino-templates/akraino-jjb-templates.yaml b/jjb/akraino-templates/akraino-jjb-templates.yaml index 01210ac..52d4901 100644 --- a/jjb/akraino-templates/akraino-jjb-templates.yaml +++ b/jjb/akraino-templates/akraino-jjb-templates.yaml @@ -115,20 +115,6 @@ builders: - lf-infra-pre-build - - config-file-provider: - files: - - file-id: lftoolsini - target: "$HOME/.config/lftools/lftools.ini" - - file-id: sigul-config - variable: SIGUL_CONFIG - - file-id: sigul-password - variable: SIGUL_PASSWORD - - file-id: sigul-pki - variable: SIGUL_PKI - - file-id: signing-pubkey - variable: SIGNING_PUBKEY - - shell: !include-raw-escape: ../global-jjb/shell/sigul-configuration.sh - - shell: !include-raw-escape: ../global-jjb/shell/sigul-install.sh - lf-maven-install: mvn-version: '{mvn-version}' - lf-update-java-alternatives: @@ -257,20 +243,6 @@ builders: - lf-infra-pre-build - - config-file-provider: - files: - - file-id: lftoolsini - target: "$HOME/.config/lftools/lftools.ini" - - file-id: sigul-config - variable: SIGUL_CONFIG - - file-id: sigul-password - variable: SIGUL_PASSWORD - - file-id: sigul-pki - variable: SIGUL_PKI - - file-id: signing-pubkey - variable: SIGNING_PUBKEY - - shell: !include-raw-escape: ../global-jjb/shell/sigul-configuration.sh - - shell: !include-raw-escape: ../global-jjb/shell/sigul-install.sh - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' diff --git a/jjb/akraino-templates/akraino-ta-common-macros.yaml b/jjb/akraino-templates/akraino-ta-common-macros.yaml index feb1bc2..a0d578c 100644 --- a/jjb/akraino-templates/akraino-ta-common-macros.yaml +++ b/jjb/akraino-templates/akraino-ta-common-macros.yaml @@ -189,16 +189,6 @@ files: - file-id: 'ta-settings' variable: 'SETTINGS_FILE' - - file-id: lftoolsini - target: "$HOME/.config/lftools/lftools.ini" - - file-id: sigul-config - variable: SIGUL_CONFIG - - file-id: sigul-password - variable: SIGUL_PASSWORD - - file-id: sigul-pki - variable: SIGUL_PKI - - file-id: signing-pubkey - variable: SIGNING_PUBKEY - inject: properties-content: 'ALT_NEXUS_URL=https://nexus3.akraino.org' - lf-infra-create-netrc: @@ -211,8 +201,6 @@ # Ensure python-tools are installed in case job template does not # call the lf-infra-pre-build macro. - ../../global-jjb/shell/python-tools-install.sh - - shell: !include-raw: ../global-jjb/shell/sigul-configuration.sh - - shell: !include-raw: ../global-jjb/shell/sigul-install.sh - shell: !include-raw: - ../shell/ta-rpm-deploy.sh - shell: !include-raw: @@ -227,24 +215,12 @@ files: - file-id: 'ta-settings' variable: 'SETTINGS_FILE' - - file-id: lftoolsini - target: "$HOME/.config/lftools/lftools.ini" - - file-id: sigul-config - variable: SIGUL_CONFIG - - file-id: sigul-password - variable: SIGUL_PASSWORD - - file-id: sigul-pki - variable: SIGUL_PKI - - file-id: signing-pubkey - variable: SIGNING_PUBKEY - lf-infra-create-netrc: server-id: images-snapshots - shell: !include-raw: # Ensure python-tools are installed in case job template does not # call the lf-infra-pre-build macro. - ../../global-jjb/shell/python-tools-install.sh - - shell: !include-raw: ../global-jjb/shell/sigul-configuration.sh - - shell: !include-raw: ../global-jjb/shell/sigul-install.sh - shell: !include-raw: - ../shell/ta-iso-deploy.sh - shell: !include-raw: diff --git a/jjb/shell/make-tar.sh b/jjb/shell/make-tar.sh index 2e8819a..adc830d 100644 --- a/jjb/shell/make-tar.sh +++ b/jjb/shell/make-tar.sh @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash # # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. # @@ -14,8 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -echo "---> make-tar.sh" - sudo yum install -y dos2unix # shellcheck source="$WORKSPACE/version.properties" disable=SC1091 dos2unix "${WORKSPACE}/version.properties" @@ -49,29 +47,25 @@ then # Build the regional controller scripts tar ball ARTIFACT_NAME="onap-amsterdam-regional-controller-${STREAM}" TAR_NAME="${ARTIFACT_NAME}-${VERSION}.tgz" - echo "---> Making tar file ${TARDIR}/${TAR_NAME}" + echo "Making tar file ${TARDIR}/${TAR_NAME}" cd ./src/regional_controller_scripts/ tar -cvzf "${TARDIR}/${TAR_NAME}" -- * # Build the ONAP VM scripts tar ball ARTIFACT_NAME="onap-amsterdam-VM-${STREAM}" TAR_NAME="${ARTIFACT_NAME}-${VERSION}.tgz" - echo "---> Making tar file ${TARDIR}/${TAR_NAME}" + echo "Making tar file ${TARDIR}/${TAR_NAME}" cd ../onap_vm_scripts/ tar -cvzf "${TARDIR}/${TAR_NAME}" -- * else TAR_NAME="${PROJECT}-${VERSION}.tgz" - echo "---> Making tar file ${TARDIR}/${TAR_NAME}" + echo "Making tar file ${TARDIR}/${TAR_NAME}" # Put the file in /tmp initially to prevent it $TARDIR from going into the tar file tar -cvzf "/tmp/${TAR_NAME}" -- * mkdir "$TARDIR" cp "/tmp/${TAR_NAME}" "${TARDIR}/${TAR_NAME}" fi - -echo "-----> Sign all artifacts" -lftools sign sigul "${TARDIR}" - set +u +x diff --git a/jjb/shell/ta-iso-deploy.sh b/jjb/shell/ta-iso-deploy.sh index 9525e8a..e40eeba 100644 --- a/jjb/shell/ta-iso-deploy.sh +++ b/jjb/shell/ta-iso-deploy.sh @@ -41,9 +41,6 @@ fi cp "$WORKSPACE/work/results/images/"* "$upload_dir1" cp "$WORKSPACE/work/results/images/"* "$upload_dir2" -echo "-----> Sign all artifacts" -lftools sign sigul "$repo_dir" - echo "-----> Upload ISOs to Nexus" lftools deploy nexus "$nexus_repo_url" "$repo_dir" rm -rf "$repo_dir" diff --git a/jjb/shell/ta-rpm-deploy.sh b/jjb/shell/ta-rpm-deploy.sh index 719ec5d..d742333 100644 --- a/jjb/shell/ta-rpm-deploy.sh +++ b/jjb/shell/ta-rpm-deploy.sh @@ -63,9 +63,6 @@ for artifact in \ fi done -echo "-----> Sign all artifacts" -lftools sign sigul "$repo_dir" - echo "-----> Upload RPMs to Nexus" lftools deploy nexus "$nexus_repo_url" "$repo_dir"