From 1c9a2269b64102fa2d52beb85087eb51f8021bfd Mon Sep 17 00:00:00 2001 From: rsundriyal Date: Fri, 1 Nov 2024 13:10:33 -0400 Subject: [PATCH 1/2] Adding clamav cargo vcs info for each rust component to be used by anyone. --- Jenkinsfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3b3b1aa924..17d46168f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -89,7 +89,7 @@ pipeline { dir(path: 'docs/html') { sh """# Move the clamav-documentation here. - cp -r ../../clamav_documentation/ . + cp -r ../../clamav_documentation/* . # Clean-up rm -rf ../../clamav_documentation rm -rf .git .nojekyll CNAME Placeholder || true @@ -122,6 +122,13 @@ pipeline { cpack --config CPackSourceConfig.cmake """ archiveArtifacts(artifacts: "clamav-${params.VERSION}*.tar.gz", onlyIfSuccessful: true) + + sh """ + jq -s 'map(. + {package_version: input_filename | split("/") | .[-2]})' $HOME/.cargo/registry/src/*/*/.cargo_vcs_info.json > clamav_cargo_vcs_info.json + """ + + archiveArtifacts(artifacts: "clamav_cargo_vcs_info.json", onlyIfSuccessful: true) + } cleanWs() } From 67597b6000d767593acae14af23d552dc65257fa Mon Sep 17 00:00:00 2001 From: rsundriyal Date: Mon, 4 Nov 2024 11:57:31 -0500 Subject: [PATCH 2/2] Fix jq command --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 17d46168f7..e75ea0f31e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -124,7 +124,7 @@ pipeline { archiveArtifacts(artifacts: "clamav-${params.VERSION}*.tar.gz", onlyIfSuccessful: true) sh """ - jq -s 'map(. + {package_version: input_filename | split("/") | .[-2]})' $HOME/.cargo/registry/src/*/*/.cargo_vcs_info.json > clamav_cargo_vcs_info.json + jq -n '[ inputs | .package_version = (input_filename | split("/") | .[-2])]' $HOME/.cargo/registry/src/*/*/.cargo_vcs_info.json > clamav_cargo_vcs_info.json """ archiveArtifacts(artifacts: "clamav_cargo_vcs_info.json", onlyIfSuccessful: true)