mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 15:37:54 -05:00
add workflow to verify artifacts (#8056)
* add workflow to verify artifacts Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net> * curate list of artifacts based on PR review Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net> * make the artifacts list simple Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net> --------- Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
This commit is contained in:
20
.github/workflows/draft-release.yml
vendored
20
.github/workflows/draft-release.yml
vendored
@@ -396,3 +396,23 @@ jobs:
|
||||
ARTIFACTORY_USER: ${{ secrets.BESU_ARTIFACTORY_USER }}
|
||||
ARTIFACTORY_KEY: ${{ secrets.BESU_ARTIFACTORY_TOKEN }}
|
||||
run: ./gradlew -Prelease.releaseVersion=${{ env.RELEASE_VERSION }} -Pversion=${{env.RELEASE_VERSION}} artifactoryPublish
|
||||
|
||||
verify_artifactory:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [artifactory, validate, test-linux, test-windows]
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
||||
with:
|
||||
ref: ${{ env.RELEASE_VERSION }}
|
||||
|
||||
# actions/setup-python@5.3
|
||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install requests argparse
|
||||
|
||||
- name: Run the script
|
||||
run: python3 .github/workflows/verify_artifacts.py --besu_version="${{ needs.validate.outputs.release_version }}"
|
||||
|
||||
55
.github/workflows/verify_artifacts.py
vendored
Normal file
55
.github/workflows/verify_artifacts.py
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import requests
|
||||
import argparse
|
||||
|
||||
|
||||
def create_artifact_paths(version):
|
||||
artifacts_base_path = "https://hyperledger.jfrog.io/hyperledger/besu-maven/org/hyperledger/besu"
|
||||
# add to this list here to update the list of artifacts to check
|
||||
artifacts = [
|
||||
# besu/evm
|
||||
f"{artifacts_base_path}/evm/{version}/evm-{version}.module",
|
||||
f"{artifacts_base_path}/evm/{version}/evm-{version}.pom",
|
||||
f"{artifacts_base_path}/evm/{version}/evm-{version}.jar",
|
||||
# besu/plugin-api
|
||||
f"{artifacts_base_path}/plugin-api/{version}/plugin-api-{version}.module",
|
||||
f"{artifacts_base_path}/plugin-api/{version}/plugin-api-{version}.pom",
|
||||
f"{artifacts_base_path}/plugin-api/{version}/plugin-api-{version}.jar",
|
||||
# besu/metrics-core
|
||||
f"{artifacts_base_path}/internal/metrics-core/{version}/metrics-core-{version}.module",
|
||||
f"{artifacts_base_path}/internal/metrics-core/{version}/metrics-core-{version}.pom",
|
||||
f"{artifacts_base_path}/internal/metrics-core/{version}/metrics-core-{version}.jar",
|
||||
# besu/internal/core
|
||||
f"{artifacts_base_path}/internal/core/{version}/core-{version}.module",
|
||||
f"{artifacts_base_path}/internal/core/{version}/core-{version}.pom",
|
||||
f"{artifacts_base_path}/internal/core/{version}/core-{version}.jar",
|
||||
# besu/internal/config
|
||||
f"{artifacts_base_path}/internal/config/{version}/config-{version}.module",
|
||||
f"{artifacts_base_path}/internal/config/{version}/config-{version}.pom",
|
||||
f"{artifacts_base_path}/internal/config/{version}/config-{version}.jar"
|
||||
# bom
|
||||
f"{artifacts_base_path}/bom/{version}/bom-{version}.module",
|
||||
f"{artifacts_base_path}/bom/{version}/bom-{version}.pom",
|
||||
]
|
||||
return artifacts
|
||||
|
||||
|
||||
|
||||
def check_url(url):
|
||||
print(f"Checking artifact at: {url}")
|
||||
r = requests.head(url)
|
||||
if (r.status_code != 200):
|
||||
raise Exception(f"Sorry, No artifact found at '{url}' !!!")
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Check besu artifacts')
|
||||
parser.add_argument('--besu_{version}', action="store", dest='besu_{version}', default="")
|
||||
args = parser.parse_args()
|
||||
print(args.besu_{version})
|
||||
|
||||
artifacts = create_artifact_paths(args.besu_{version})
|
||||
print(artifacts)
|
||||
for url in artifacts:
|
||||
check_url(url)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user