Skip to content

Commit

Permalink
Artifact #7
Browse files Browse the repository at this point in the history
  • Loading branch information
howieavp76 authored and david-waltermire committed Jun 6, 2019
1 parent 6fea4f0 commit a829887
Showing 1 changed file with 18 additions and 60 deletions.
78 changes: 18 additions & 60 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ references:
attach_build_workspace: &attach_build_workspace
attach_workspace:
at: build_artifacts
- build # for roundtrip artifacts
checkout: &checkout
checkout:
path: git-oscal
Expand Down Expand Up @@ -42,6 +41,15 @@ commands:
key: maven-m2
paths:
- ~/.m2
install-schematron:
description: "Retrieve the schematron skeleton and setup the environment to run it"
steps:
- run:
name: Get schematron skeleton
command: |
git clone --depth 1 --no-checkout https://github.com/Schematron/schematron.git "$SCHEMATRON_HOME"
cd "$SCHEMATRON_HOME"
git checkout master -- trunk/schematron/code
install-maven:
description: "Installs Maven"
steps:
Expand All @@ -53,24 +61,9 @@ commands:
description: "Installs Python lxml package"
steps:
- run:
<<<<<<< HEAD
name: Get lxml
command: |
sudo pip install lxml
install-schematron:
description: "Retrieve the schematron skeleton and setup the environment to run it"
steps:
- run:
name: Get schematron skeleton
command: |
git clone --depth 1 --no-checkout https://github.com/Schematron/schematron.git "$SCHEMATRON_HOME"
cd "$SCHEMATRON_HOME"
git checkout master -- trunk/schematron/code
=======
name: Get lxml
command: |
sudo pip install lxml
>>>>>>> CI/CD Bug Fix
install-xmllint:
description: "Retrieve xmllint and setup the environment to run it"
steps:
Expand Down Expand Up @@ -113,13 +106,6 @@ commands:
name: Get hub
command: |
sudo brew install hub
install-python-libs:
description: "Retrieve python libs and setup the environment to run it"
steps:
- run:
name: Get Python Libs
command: |
install-bundler:
description: "Install bundler and html-proofer"
steps:
Expand All @@ -141,18 +127,18 @@ commands:
fi
executors:
java-executor:
docker: # run the java steps with Docker
docker: # run the java jobs with Docker
- image: circleci/openjdk:8-jdk-node-browsers
<<: *common_environment
ruby-node-executor:
docker: # run the ruby steps with Docker
docker: # run the ruby jobs with Docker
- image: circleci/ruby:2.4.6-node-browsers
<<: *common_environment
<<: *common_environment
python-executor:
docker: #run the python steps with Docker
docker: #run the python jobs with Docker
- image: circleci/python:3.7.3-node-browsers
<<: *common_environment
jobs: # a collection of build jobs
jobs: # a collection of
job-ci-skip-check:
executor: java-executor
steps:
Expand Down Expand Up @@ -265,27 +251,7 @@ jobs: # a collection of build jobs
- run:
name: Validate content instances
command: |
bash "${CICD_DIR}/validate-content.sh" "$OSCAL_BUILD_DIR"
job-roundtrip-conversions:
executor: python-executor
steps:
- *checkout
- *attach_build_workspace
- install-ajv
- run:
name: Generate round trip XML and JSON conversions
command: |
sudo apt-get install maven
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DartifactId=Saxon-HE -DgroupId=net.sf.saxon -Dversion=$SAXON_VERSION
sudo pip install lxml
bash "$CICD_DIR/roundTripXML.sh" "$OSCAL_BUILD_DIR"
- run:
name: Copy files as artifacts in CI/CD
command: |
echo "Trying to move files to the %s directory" "${OSCAL_BUILD_DIR)"
mv "${OSCALDIR}"/build/ci-cd/temp/* "${OSCAL_BUILD_DIR}"/build
- *publish_artifacts
- *persist_to_build_workspace
bash "$CICD_DIR/validate-content.sh" "$OSCAL_BUILD_DIR"
job-roundtrip-conversions:
executor: python-executor
steps:
Expand All @@ -299,9 +265,7 @@ jobs: # a collection of build jobs
name: Generate round trip XML and JSON conversions
command: |
bash "${CICD_DIR}/roundTripXML.sh" "$OSCAL_BUILD_DIR"
- store_artifacts:
path: "git-checkout/build/ci-cd/temp/"
destination: home/circleci/oscal/build_artifacts/build
*publish_artifacts
job-generate-docs:
executor: java-executor
steps:
Expand Down Expand Up @@ -415,7 +379,9 @@ workflows:
build:
jobs:
- job-ci-skip-check
- job-roundtrip-conversions
- job-validate-markdown:

requires:
- job-ci-skip-check
filters:
Expand All @@ -442,9 +408,6 @@ workflows:
requires:
- job-generate-converters
- job-validate-content
- job-roundtrip-conversions:
requires:
- job-copy-and-convert-content
- job-generate-docs:
requires:
- job-validate-metaschema
Expand All @@ -458,11 +421,6 @@ workflows:
ignore:
- master
- nist-pages
=======
- job-roundtrip-conversions:
requires:
- job-copy-and-convert-content
>>>>>>> Add Roundtrip Check to CI/CD
- job-deploy-artifacts:
requires:
- job-copy-and-convert-content
Expand Down

0 comments on commit a829887

Please sign in to comment.