Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit abef4ff

Browse files
joshuafernandesmacfarla
authored andcommitted
add workflow to verify artifacts (#8056)
* add workflow to verify artifacts Signed-off-by: Joshua Fernandes <[email protected]> * curate list of artifacts based on PR review Signed-off-by: Joshua Fernandes <[email protected]> * make the artifacts list simple Signed-off-by: Joshua Fernandes <[email protected]> --------- Signed-off-by: Joshua Fernandes <[email protected]> Co-authored-by: Sally MacFarlane <[email protected]>
1 parent a2f24f8 commit abef4ff

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.github/workflows/draft-release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,23 @@ jobs:
396396
ARTIFACTORY_USER: ${{ secrets.BESU_ARTIFACTORY_USER }}
397397
ARTIFACTORY_KEY: ${{ secrets.BESU_ARTIFACTORY_TOKEN }}
398398
run: ./gradlew -Prelease.releaseVersion=${{ env.RELEASE_VERSION }} -Pversion=${{env.RELEASE_VERSION}} artifactoryPublish
399+
400+
verify_artifactory:
401+
runs-on: ubuntu-22.04
402+
needs: [artifactory, validate, test-linux, test-windows]
403+
steps:
404+
- name: checkout
405+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
406+
with:
407+
ref: ${{ env.RELEASE_VERSION }}
408+
409+
# actions/[email protected]
410+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
411+
with:
412+
python-version: '3.13'
413+
414+
- name: Install dependencies
415+
run: pip install requests argparse
416+
417+
- name: Run the script
418+
run: python3 .github/workflows/verify_artifacts.py --besu_version="${{ needs.validate.outputs.release_version }}"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import requests
2+
import argparse
3+
4+
5+
def create_artifact_paths(version):
6+
artifacts_base_path = "https://hyperledger.jfrog.io/hyperledger/besu-maven/org/hyperledger/besu"
7+
# add to this list here to update the list of artifacts to check
8+
artifacts = [
9+
# besu/evm
10+
f"{artifacts_base_path}/evm/{version}/evm-{version}.module",
11+
f"{artifacts_base_path}/evm/{version}/evm-{version}.pom",
12+
f"{artifacts_base_path}/evm/{version}/evm-{version}.jar",
13+
# besu/plugin-api
14+
f"{artifacts_base_path}/plugin-api/{version}/plugin-api-{version}.module",
15+
f"{artifacts_base_path}/plugin-api/{version}/plugin-api-{version}.pom",
16+
f"{artifacts_base_path}/plugin-api/{version}/plugin-api-{version}.jar",
17+
# besu/metrics-core
18+
f"{artifacts_base_path}/internal/metrics-core/{version}/metrics-core-{version}.module",
19+
f"{artifacts_base_path}/internal/metrics-core/{version}/metrics-core-{version}.pom",
20+
f"{artifacts_base_path}/internal/metrics-core/{version}/metrics-core-{version}.jar",
21+
# besu/internal/core
22+
f"{artifacts_base_path}/internal/core/{version}/core-{version}.module",
23+
f"{artifacts_base_path}/internal/core/{version}/core-{version}.pom",
24+
f"{artifacts_base_path}/internal/core/{version}/core-{version}.jar",
25+
# besu/internal/config
26+
f"{artifacts_base_path}/internal/config/{version}/config-{version}.module",
27+
f"{artifacts_base_path}/internal/config/{version}/config-{version}.pom",
28+
f"{artifacts_base_path}/internal/config/{version}/config-{version}.jar"
29+
# bom
30+
f"{artifacts_base_path}/bom/{version}/bom-{version}.module",
31+
f"{artifacts_base_path}/bom/{version}/bom-{version}.pom",
32+
]
33+
return artifacts
34+
35+
36+
37+
def check_url(url):
38+
print(f"Checking artifact at: {url}")
39+
r = requests.head(url)
40+
if (r.status_code != 200):
41+
raise Exception(f"Sorry, No artifact found at '{url}' !!!")
42+
43+
def main():
44+
parser = argparse.ArgumentParser(description='Check besu artifacts')
45+
parser.add_argument('--besu_{version}', action="store", dest='besu_{version}', default="")
46+
args = parser.parse_args()
47+
print(args.besu_{version})
48+
49+
artifacts = create_artifact_paths(args.besu_{version})
50+
print(artifacts)
51+
for url in artifacts:
52+
check_url(url)
53+
54+
if __name__ == "__main__":
55+
main()

0 commit comments

Comments
 (0)