Skip to content
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

Fix release asset links for usnistgov/OSCAL-Pages#48 #30

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

aj-stein-nist
Copy link
Contributor

As part of the issue above, we need to fix two issues to make sure that the release asset link generation functions correctly.

  1. In the Makefile, we were binding RELEASE_ASSET_REDIRECTS_DIR to its default value after the relevant build target. This fails silently.
  2. While testing and troubleshooting fix 1, we noticed that the make target list-release-artifacts for usnistgov/OSCAL includes the relative path for the artifacts, not just the file names. So the following path is created.

site/public/release-assets/latest/generated/oscal_complete_schema.xsd/index.html

The intended result is below.

site/public/release-assets/latest/oscal_complete_schema.xsd/index.html

A workaround in generate_release_assets_redirect.sh was used to blank out the sub-directory.

As part of the issue above, we need to fix two issues to make sure that
the release asset link generation functions correctly.

1. In the Makefile, we were binding `RELEASE_ASSET_REDIRECTS_DIR` to its
default value after the relevant build target. This fails silently.
1. While testing and troubleshooting fix 1, we noticed that the make
target `list-release-artifacts` for usnistgov/OSCAL includes the relative
path for the artifacts, not just the file names. So the following path
is created.

site/public/release-assets/latest/generated/oscal_complete_schema.xsd/index.html

The intended result is below.

site/public/release-assets/latest/oscal_complete_schema.xsd/index.html

A workaround in generate_release_assets_redirect.sh was used to blank
out the sub-directory.
We still are encountering build failures because the embedded submodule
of usnistgov/OSCAL has the make target we need to get the release assets
to build redirects for, but the BZ2 tarball and ZIP archives default to
include SNAPSHOT without an explicit version. We need to pass that into
the make target as runtime variable when calling it in the
generate_release_assets_redirect script.

https://github.com/usnistgov/OSCAL-Reference/actions/runs/6632414106

Co-Authored-By: Arminta Jenkins <[email protected]>
@aj-stein-nist aj-stein-nist marked this pull request as ready for review October 24, 2023 21:45
@aj-stein-nist aj-stein-nist requested a review from a team as a code owner October 24, 2023 21:45
@aj-stein-nist aj-stein-nist force-pushed the 48-fix-release-asset-links branch from 37e289b to cbdb287 Compare October 24, 2023 22:25
@github-actions
Copy link

Summary

Status Count
🔍 Total 77430
✅ Successful 39768
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 37662
❓ Unknown 0
🚫 Errors 0

@aj-stein-nist aj-stein-nist merged commit 684de38 into main Oct 25, 2023
1 check passed
@aj-stein-nist aj-stein-nist deleted the 48-fix-release-asset-links branch October 25, 2023 14:06
@iMichaela iMichaela linked an issue Jan 16, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants