-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4f233ca
add workflow to verify artifacts
joshuafernandes 493e9ab
Merge branch 'main' into verify-artifacts
joshuafernandes 48001a9
curate list of artifacts based on PR review
joshuafernandes 1d2e0bc
Merge branch 'verify-artifacts' of github.com:hyperledger/besu into v…
joshuafernandes df2b854
Merge branch 'main' into verify-artifacts
joshuafernandes 7de7759
make the artifacts list simple
joshuafernandes d9ae8fa
Merge branch 'verify-artifacts' of github.com:hyperledger/besu into v…
joshuafernandes 33e7456
Merge branch 'main' into verify-artifacts
joshuafernandes 303ec86
Merge branch 'main' into verify-artifacts
macfarla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
also verify bom is present
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.
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 comment
The 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