Skip to content

Commit

Permalink
chore: add local lula compose task (#892)
Browse files Browse the repository at this point in the history
## Description

Created a local task to run Lula Compose.

Due to the structure of UDS Core there are several oscal-component.yaml
under src/service-name with a top level oscal-component.yaml in the
./compliance directory.

To create a single holistic artifact that can be used as a deliverable
and the source of truth/tested artifact we need a way to run `lula tools
compose -f ./compliance/oscal-component.yaml`


The task will likely stay local as opposed to moving into UDS Common
because the functionality of the monorepo. This could be change in the
future as more scenarios unfold but can be easily ported.

## Related Issue

Relates to #798

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed
  • Loading branch information
CloudBeard authored Oct 18, 2024
1 parent 105aea6 commit 075b519
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ jobs:
if: ${{ inputs.package == 'all' && inputs.test_type == 'install' }}
run: uds run test-uds-core --set FLAVOR=${{ inputs.flavor }} --no-progress

- name: Compose UDS Core Component Definitions
if: ${{ inputs.package == 'all' && inputs.test_type == 'install' }}
run: uds run test-compliance-compose --no-progress

- name: Validate UDS Core Compliance
if: ${{ inputs.package == 'all' && inputs.test_type == 'install' }}
run: uds run test-compliance-validate --no-progress
Expand Down
5 changes: 5 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ tasks:
actions:
- task: test:uds-core-upgrade

- name: test-compliance-compose
description: "Compose OSCAL Component Definition"
actions:
- task: test:local-compliance-compose

- name: test-compliance-validate
description: "Validate Compliance of UDS Core to produce Assessment Results"
actions:
Expand Down
13 changes: 12 additions & 1 deletion tasks/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ tasks:
actions:
- task: compliance:validate
with:
oscalfile: ./compliance/oscal-component.yaml
oscalfile: ./compliance/oscal-component-composed.yaml
assessment_results: ./compliance/oscal-assessment-results.yaml
options: -t il4

Expand All @@ -93,3 +93,14 @@ tasks:
with:
assessment_results: ./compliance/oscal-assessment-results.yaml
options: -t il4

- name: local-compliance-compose
description: "compose oscal component definitions"
inputs:
oscalfile:
description: oscal file to compose
default: ./compliance/oscal-component.yaml
options:
description: for setting additional flags
actions:
- cmd: lula tools compose -f ${{ .inputs.oscalfile }} ${{ .inputs.options }}

0 comments on commit 075b519

Please sign in to comment.