-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add workflow to verify artifacts #8056
Changes from 5 commits
4f233ca
493e9ab
48001a9
1d2e0bc
df2b854
7de7759
d9ae8fa
33e7456
303ec86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
- 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 }}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import requests | ||
import argparse | ||
|
||
|
||
def create_artifact_paths(version): | ||
artifacts = [] | ||
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 | ||
besu_paths = [ | ||
f"evm/{version}/evm-{version}", | ||
f"plugin-api/{version}/plugin-api-{version}", | ||
f"internal/metrics-core/{version}/metrics-core-{version}", | ||
f"internal/core/{version}/core-{version}", | ||
f"internal/config/{version}/config-{version}" | ||
] | ||
for path in besu_paths: | ||
artifacts.append(f"{artifacts_base_path}/{path}.module") | ||
artifacts.append(f"{artifacts_base_path}/{path}.pom") | ||
artifacts.append(f"{artifacts_base_path}/{path}.jar") | ||
return artifacts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also verify bom is present There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bom module has .pom and .module eg https://hyperledger.jfrog.io/ui/native/besu-maven/org/hyperledger/besu/bom/24.12.2/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 Done @macfarla. This is now a plain list so easy to edit. Ready for review |
||
|
||
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@macfarla add to this list here to keep it fresh and it'll check jar, pom and module for each item