Skip to content

Commit

Permalink
Archive results of dedicated triggered composition and integration jobs
Browse files Browse the repository at this point in the history
... as well in the parent aka triggering job

CMK-20711

Change-Id: I36d1619d0a324547dd36cba727c0b441b4c751cc
  • Loading branch information
JonasScharpf committed Dec 20, 2024
1 parent 610772c commit 4f8cdb5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
25 changes: 24 additions & 1 deletion buildscripts/scripts/test-composition.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main() {
condition: run_condition,
raiseOnError: true,
) {
build(
def job = build(
job: relative_job_name,
propagate: true, // Raise any errors
parameters: [
Expand All @@ -98,13 +98,36 @@ def main() {
string(name: "CIPARAM_CLEANUP_WORKSPACE", value: CIPARAM_CLEANUP_WORKSPACE),
],
);

copyArtifacts(
projectName: relative_job_name,
selector: specific(job.getId()), // buildNumber shall be a string
target: "${checkout_dir}/test-results",
fingerprintArtifacts: true
);
}
}
}

stage('Run composition tests') {
parallel build_for_parallel;
}

stage("Archive / process test reports") {
dir("${checkout_dir}") {
show_duration("archiveArtifacts") {
archiveArtifacts(allowEmptyArchive: true, artifacts: "test-results/**");
}
xunit([Custom(
customXSL: "$JENKINS_HOME/userContent/xunit/JUnit/0.1/pytest-xunit.xsl",
deleteOutputFiles: true,
failIfNotNew: true,
pattern: "**/junit.xml",
skipNoTestFiles: false,
stopProcessingIfError: true
)]);
}
}
}

return this;
25 changes: 24 additions & 1 deletion buildscripts/scripts/test-integration-packages.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def main() {
condition: run_condition,
raiseOnError: true,
) {
build(
def job = build(
job: relative_job_name,
propagate: true, // Raise any errors
parameters: [
Expand All @@ -96,13 +96,36 @@ def main() {
string(name: "CIPARAM_CLEANUP_WORKSPACE", value: CIPARAM_CLEANUP_WORKSPACE),
],
);

copyArtifacts(
projectName: relative_job_name,
selector: specific(job.getId()), // buildNumber shall be a string
target: "${checkout_dir}/test-results",
fingerprintArtifacts: true
);
}
}
}

stage('Run integration tests') {
parallel build_for_parallel;
}

stage("Archive / process test reports") {
dir("${checkout_dir}") {
show_duration("archiveArtifacts") {
archiveArtifacts(allowEmptyArchive: true, artifacts: "test-results/**");
}
xunit([Custom(
customXSL: "$JENKINS_HOME/userContent/xunit/JUnit/0.1/pytest-xunit.xsl",
deleteOutputFiles: true,
failIfNotNew: true,
pattern: "**/junit.xml",
skipNoTestFiles: false,
stopProcessingIfError: true
)]);
}
}
}

return this;

0 comments on commit 4f8cdb5

Please sign in to comment.