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

Model refactoring based on feedback (Session 1) #614

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
67275f0
Merged reference and citation per #612
david-waltermire Jan 29, 2020
9c87ce1
Clarified the semantics of rlink and base64 per #518
david-waltermire Jan 29, 2020
b3d7759
Added revision history to metadata per issues #597 and #498
david-waltermire Jan 29, 2020
fd430f4
Per issue #552, added a location object, which can be referenced from…
david-waltermire Jan 29, 2020
db721ae
adjusted the catalog revision to be better aligned with required sema…
david-waltermire Jan 29, 2020
a930b77
Further adjustment to citation model; M2->M3 data transformation; exa…
wendellpiez Jan 30, 2020
796a19d
Now updating the catalog (for the sake of the diff)
wendellpiez Jan 30, 2020
3655253
Adding back old catalog as 'M2' since we may need it still
wendellpiez Jan 30, 2020
f3518b0
Moved content updating transformations into 'release' folder
wendellpiez Feb 4, 2020
b212392
Finishing migration of citation data to new model
wendellpiez Feb 4, 2020
ee3d2ea
Renamed 'set-param' in SSP for consistency with the Profile model; ch…
wendellpiez Jan 23, 2020
37f9038
Catching up to schema modifications with the corresponding data modif…
wendellpiez Jan 23, 2020
57ae49f
Updating generated schemas
wendellpiez Jan 23, 2020
37277a9
Latest decision on #568 settles on 'set-parameter' as the singular na…
wendellpiez Jan 24, 2020
dab8003
Argh. This error was flagged by the robot and ignored by the person. …
wendellpiez Jan 27, 2020
10c1c33
Updated FedRAMP Profiles
brian-ruf Jan 28, 2020
2c2361c
Adding Resolved Profiles
brian-ruf Jan 28, 2020
66aa6a6
Moved FedRAMP baselines to correct folder under src
brian-ruf Jan 30, 2020
9d6ea18
removed generated files
wendellpiez Feb 4, 2020
c478c5b
Deploying content [ci deploy skip]
Feb 4, 2020
dc84a31
added the metaschema repository as a submodule
david-waltermire Jan 22, 2020
aea4001
Integrated schema generation scripts as part of issue #596 work.
david-waltermire Jan 23, 2020
89408d1
Fixed local path in file for issue #566
david-waltermire Jan 23, 2020
e6ea468
Completed first pass through CI/CD scripts in support of #596
david-waltermire Jan 28, 2020
e2a203c
Started to cleanup old metaschema documentation. More review is neede…
david-waltermire Jan 28, 2020
240becc
Added submodules to all CI/CD-related build steps
david-waltermire Jan 28, 2020
2d1e389
Updating to latest metaschema code
david-waltermire Jan 28, 2020
e490886
Added missing build tool dependency
david-waltermire Jan 28, 2020
0679f97
Fixed broken links per #573 and repaired link checker to find them
david-waltermire Jan 30, 2020
35a6cb0
fixed empty description
david-waltermire Jan 31, 2020
878188d
updating to latest metaschema repo
david-waltermire Jan 31, 2020
0b417a9
updated link checking for repo markdown files
david-waltermire Jan 31, 2020
8a1b8cc
updated link checking for repo markdown files
david-waltermire Jan 31, 2020
e62ad4a
Update to fix path to valdiator configuration
david-waltermire Jan 31, 2020
1c60372
Update to fix path to website directory
david-waltermire Jan 31, 2020
7e036c9
updating to the latest metaschema build
david-waltermire Feb 5, 2020
c1f931e
removed fedramp catalog from build, which has been removed from the repo
david-waltermire Feb 5, 2020
9c5e1ab
fixed validation and conversion errors in SSP example source
david-waltermire Feb 5, 2020
5aca180
Deploying content [ci deploy skip]
Feb 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 33 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ references:
SAXON_VERSION: 9.9.0-1
JSON_CLI_VERSION: 0.0.1-SNAPSHOT
CICD_DIR: git-oscal/build/ci-cd
OSCAL_REPO_DIR: git-oscal
REPO_DIR: git-oscal
REPO_WEBSITE_DIR: git-oscal/docs
OSCAL_BUILD_DIR: build_artifacts
OSCAL_TOOLS_DIR: oscal_tools
SCHEMATRON_HOME: git-schematron
Expand All @@ -23,7 +24,7 @@ references:
run:
name: Checkout Submodules
command: |
cd "$OSCAL_REPO_DIR"
cd "$REPO_DIR"
git submodule sync --recursive
git submodule update --recursive --init
publish_artifacts: &publish_artifacts
Expand Down Expand Up @@ -128,6 +129,13 @@ commands:
name: Get ajv
command: |
sudo npm install -g ajv-cli
install-json-diff:
description: "Install json-diff"
steps:
- run:
name: Get json-diff
command: |
sudo npm install -g json-diff
install-markdown-link-check:
description: "Install markdown-link-check"
steps:
Expand Down Expand Up @@ -162,7 +170,7 @@ commands:
- run:
name: Install with Bundler
command: |
cd "$OSCAL_REPO_DIR/docs"
cd "$REPO_WEBSITE_DIR"
gem update --system
gem install bundler
bundle install --path vendor/bundle --jobs=4 --retry=3 && bundle clean
Expand Down Expand Up @@ -217,6 +225,7 @@ jobs: # a collection of
executor: java-executor
steps:
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-xmllint
Expand All @@ -235,6 +244,7 @@ jobs: # a collection of
executor: java-executor
steps: # a collection of executable commands
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-maven-dependencies
Expand All @@ -253,6 +263,7 @@ jobs: # a collection of
executor: java-executor
steps: # a collection of executable commands
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-maven-dependencies
Expand All @@ -270,6 +281,7 @@ jobs: # a collection of
executor: java-executor
steps: # a collection of executable commands
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-maven-dependencies
Expand All @@ -289,18 +301,21 @@ jobs: # a collection of
executor: java-executor
steps:
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-markdown-link-check
- run:
name: Validate repo Markdown content instances
command: |
cd "$REPO_DIR"
# this command will filter out any docs Markdown files, which are checked in a different job
find "$OSCAL_REPO_DIR" -path "${OSCAL_REPO_DIR}/docs" -prune -o -name \*.md -print0 | xargs -0 -n1 markdown-link-check -q
git ls-files "*/*.md" -z | grep --null-data -v "^docs/" | xargs -0 -n1 markdown-link-check -q -c "build/config/.markdown-link-check/config.json"
job-validate-content:
executor: java-executor
steps:
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-xmllint
Expand All @@ -313,12 +328,14 @@ jobs: # a collection of
executor: python-executor
steps:
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-maven
- install-maven-dependencies
- install-lxml
- install-xmllint
- install-json-diff
- run:
name: Generate round trip XML and JSON conversions
command: |
Expand Down Expand Up @@ -354,7 +371,7 @@ jobs: # a collection of
- deploy: # delete and copy artifacts before deploy
name: Commit Artifacts
command: |
cd "$OSCAL_REPO_DIR"
cd "$REPO_DIR"
# Remove existing generated files
git rm -r --ignore-unmatch xml/convert/*.xsl
git rm -r --ignore-unmatch xml/schema/*.xsd
Expand All @@ -365,8 +382,8 @@ jobs: # a collection of
git rm -r --ignore-unmatch content/**/*.yaml
# Copy new built files to repo
cd -
cp -r "$OSCAL_BUILD_DIR"/* "$OSCAL_REPO_DIR"
cd "$OSCAL_REPO_DIR"
cp -r "$OSCAL_BUILD_DIR"/* "$REPO_DIR"
cd "$REPO_DIR"
# add the new files
git add -f --all xml
git add -f --all json
Expand Down Expand Up @@ -402,14 +419,14 @@ jobs: # a collection of
name: Restore generated site content
command: |
# restore docs from tar
tar -zxvf "${OSCAL_BUILD_DIR}/docs.tar.gz" --directory "${OSCAL_REPO_DIR}/docs" --strip-components=2
tar -zxvf "${OSCAL_BUILD_DIR}/docs.tar.gz" --directory "${REPO_WEBSITE_DIR}" --strip-components=2
- run:
name: Build and Validate Hugo site
command: |
# cp -vr "$OSCAL_BUILD_DIR"/* "$OSCAL_REPO_DIR"
cd "$OSCAL_REPO_DIR/docs"
# cp -vr "$OSCAL_BUILD_DIR"/* "$REPO_DIR"
cd "$REPO_WEBSITE_DIR"
hugo -v --debug --minify
bundle exec htmlproofer --allow-hash-href --disable-external public/ --url-swap "\/OSCAL\/:/" --assume-extension --log-level :debug --url-ignore "/\/OSCAL\/docs\/schemas\//,/#/,/https:\/\/raw\.githubusercontent\.com/"
bundle exec htmlproofer --allow-hash-href public/ --url-swap "https\://pages.nist.gov/OSCAL/:/" --assume-extension --log-level :debug --url-ignore "/\/OSCAL\/docs\/\/documentation\/schemas\/[^/]+\/(?:json|xml)-(?:model-map|schema)/,/#/,/pages.nist.gov\/(?:nist-header-footer|leaveNotice)\/.+/"
- *save_gem_cache
- *publish_artifacts
job-build-and-deploy-website:
Expand All @@ -426,12 +443,12 @@ jobs: # a collection of
name: Restore generated site content
command: |
# restore docs from tar
tar -zxvf "${OSCAL_BUILD_DIR}/docs.tar.gz" --directory "${OSCAL_REPO_DIR}/docs" --strip-components=2
tar -zxvf "${OSCAL_BUILD_DIR}/docs.tar.gz" --directory "${REPO_WEBSITE_DIR}" --strip-components=2
- run:
name: Build Site with Hugo
command: |
# cp -vr "$OSCAL_BUILD_DIR"/* "$OSCAL_REPO_DIR"
cd "$OSCAL_REPO_DIR/docs"
# cp -vr "$OSCAL_BUILD_DIR"/* "$REPO_DIR"
cd "$REPO_WEBSITE_DIR"
hugo -v --debug --minify
mkdir -p public/.circleci
# copy the circleci config
Expand All @@ -442,7 +459,7 @@ jobs: # a collection of
- run:
name: Run deploy script
command: |
cd "$OSCAL_REPO_DIR/docs"
cd "$REPO_WEBSITE_DIR"
git config user.name "Deployment Bot"
bash ./deploy.sh --push-only -v -m "Deploying website [ci deploy skip]"
- *publish_artifacts
Expand All @@ -459,6 +476,7 @@ jobs: # a collection of
executor: java-executor
steps:
- *checkout
- *checkout-submodules
- *attach_build_workspace
- check-skip-build
- install-xmllint
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ xspec/*.html
# Produced in CircleCI build
/.skipbuild
/.runbuild
# Generated by scripts
.metaschema-cache
# generated by /build/ci-cd/generate-content-converters.sh and /build/ci-cd/generate-schema.sh
/xml
/json
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
url = git@github.com:usnistgov/hugo-uswds.git
branch = master
update = rebase
[submodule "build/metaschema"]
path = build/metaschema
url = git@github.com:usnistgov/metaschema.git
branch = master
3 changes: 2 additions & 1 deletion build/ci-cd/config/content
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# path to source|format of source|model of source|format(s) to convert to
src/content/ssp-example/ssp-example.json|json|ssp|xml
src/content/fedramp.gov/xml/*catalog.xml|xml|catalog|json
#src/content/fedramp.gov/xml/FedRAMP_catalog.xml|xml|catalog|json
src/content/fedramp.gov/xml/*profile.xml|xml|profile|json
src/content/nist.gov/SP800-53/rev4/xml/*catalog.xml|xml|catalog|json
src/content/nist.gov/SP800-53/rev4/xml/*profile.xml|xml|profile|json

1 change: 1 addition & 0 deletions build/ci-cd/config/metaschema
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ src/metaschema/oscal_catalog_metaschema.xml|xml,json|xml,json|xml,json
src/metaschema/oscal_profile_metaschema.xml|xml,json|xml,json|xml,json
src/metaschema/oscal_component_metaschema.xml|xml,json|xml,json|xml,json
src/metaschema/oscal_ssp_metaschema.xml|xml,json|xml,json|xml,json

Loading