X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fnsm%2Fe2e.Jenkinsfile;h=26b64b39f40cd7463130f4bfb0b570ceba927682;hb=108c0cb62c3677e0bc5fef183019b06a50771cc6;hp=06e0e12686a6e3834876ec55f9043d7d1a94e4e2;hpb=d3f884211e5c036389dcb39793e910c79f7b2e11;p=infra%2Fcicd.git diff --git a/jjb/nsm/e2e.Jenkinsfile b/jjb/nsm/e2e.Jenkinsfile index 06e0e126..26b64b39 100644 --- a/jjb/nsm/e2e.Jenkinsfile +++ b/jjb/nsm/e2e.Jenkinsfile @@ -33,6 +33,7 @@ node('nordix-nsm-build-ubuntu2204') { def environment_name = params.ENVIRONMENT_NAME def focus = params.FOCUS def skip = params.SKIP + def kind_external_host_default_route = params.KIND_EXTERNAL_HOST_DEFAULT_ROUTE def seed = params.SEED @@ -53,7 +54,7 @@ node('nordix-nsm-build-ubuntu2204') { stage('Environment') { currentBuild.description = "Meridio version: $meridio_version / TAPA version: $tapa_version / NSM version: $nsm_version / IP Family: $ip_family / Kubernetes version: $kubernetes_version / Current Branch: $current_branch / Seed: $seed" - def command = "make -s -C test/e2e/environment/$environment_name/ KUBERNETES_VERSION=$kubernetes_version NSM_VERSION=$nsm_version IP_FAMILY=$ip_family KUBERNETES_WORKERS=$number_of_workers MERIDIO_VERSION=$meridio_version TAPA_VERSION=$tapa_version" + def command = "make -s -C test/e2e/environment/$environment_name/ KUBERNETES_VERSION=$kubernetes_version NSM_VERSION=$nsm_version IP_FAMILY=$ip_family KUBERNETES_WORKERS=$number_of_workers MERIDIO_VERSION=$meridio_version TAPA_VERSION=$tapa_version KIND_EXTERNAL_HOST_DEFAULT_ROUTE=$kind_external_host_default_route" try { ExecSh(command).call() } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) { @@ -82,7 +83,7 @@ node('nordix-nsm-build-ubuntu2204') { } stage('Report') { try { - Report().call() + Report(build_number).call() } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) { currentBuild.result = 'ABORTED' } catch (Exception e) { @@ -169,7 +170,7 @@ def GetSeed() { } // http://JENKINS_URL/job/meridio-e2e-test-kind/api/json?tree=allBuilds[status,timestamp,id,result,description]{0,9}&pretty=true -def Report() { +def Report(id) { return { def jenkins_url = 'jenkins.nordix.org' @@ -199,8 +200,15 @@ def Report() { ReportIPFamily(success, failure).call() ReportKubernetes(success, failure).call() + sh 'printenv > _output/parameters.txt' + sh "echo 'RESULT=$currentBuild.result' >> _output/parameters.txt" + try { archiveArtifacts artifacts: '_output/**/*.*', followSymlinks: false + sh "tar -czvf ${id}.tar.gz -C _output ." + withCredentials([string(credentialsId: 'nsm-nordix-artifactory-api-key', variable: 'API_KEY')]) { + sh "curl -H 'X-JFrog-Art-Api:${API_KEY}' -T ${id}.tar.gz 'https://artifactory.nordix.org/artifactory/cloud-native/meridio/e2e-test-reports/${id}.tar.gz'" + } } catch (Exception e) { } }