Skip to content

84 add stmd file according to cmp #85

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

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: No_0_RequirementsPhase_DefineModelRequirements
on:
workflow_call:
outputs:
summary:
value: ${{jobs.No_0_RequirementsPhase_DefineModelRequirements.outputs.summary}}
secrets:
WRITE_WORKFLOW:
required: true
jobs:
No_0_RequirementsPhase_DefineModelRequirements:
runs-on: ubuntu-20.04
outputs:
summary: ${{steps.outputStep.outputs.summary}}
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.WRITE_WORKFLOW }}
- name: set STMD Folder path
run: echo 'STMDFOLDERPATH=/home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/doc' >> $GITHUB_ENV && echo $STMDFOLDERPATH
- name: install prerequisites
run: sudo chmod +x /home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/doc/gaiax-ci/processing_functions/prerequisites/install_node_utilities.sh && sudo /home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/doc/gaiax-ci/processing_functions/prerequisites/install_node_utilities.sh
- name: activate NodeJS version 18.17.0 for metric
./gaiax-ci/quality_metrics/node_metrics/level_1/checkSingleSemantic
uses: actions/setup-node@v3
with:
node-version: 18.17.0
- name: Remove node_modules, reset libs
run: |
npm ls --parseable --depth=0 | tail -n +2 | awk -F'/' '{print $NF}' | xargs -r npm uninstall

- name: install node module
run: npm install --prefix /home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/gaiax-ci/quality_metrics/node_metrics/level_1 /home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/gaiax-ci/quality_metrics/node_metrics/level_1
- name: requirement_check_001
run: res=$(node -e 'const {wrapper} = require("/home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/doc/workflow_utils/wrapper/fcnWrapperNode"); let nodeResult = wrapper("./gaiax-ci/quality_metrics/node_metrics/level_1", "checkSingleSemantic", ["x509Certificate","signedExpertStatement"], ["./data/cert_ahmann.crt","./data/expertStatement_req_m_01.json"], ["file","file"], "/home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/doc", {"level":"1","id":"requirement_check_001"}); process.stdout.write(JSON.stringify(nodeResult));') && echo $res && node /home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/doc/workflow_utils/results.js -p "$res" -o No.0.RequirementsPhase.DefineModelRequirements.cdkResult.json
- name: show report
run: cat No.0.RequirementsPhase.DefineModelRequirements.cdkResult.json
- name: send to outputs
id: outputStep
run: echo "summary=$(cat
No.0.RequirementsPhase.DefineModelRequirements.cdkResult.json)" >>
$GITHUB_OUTPUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: No_1_ImplementationPhase_IntegrateSimulation
on:
workflow_call:
outputs:
summary:
value: ${{jobs.No_1_ImplementationPhase_IntegrateSimulation.outputs.summary}}
secrets:
WRITE_WORKFLOW:
required: true
jobs:
No_1_ImplementationPhase_IntegrateSimulation:
runs-on: ubuntu-20.04
outputs:
summary: ${{steps.outputStep.outputs.summary}}
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.WRITE_WORKFLOW }}
- name: set STMD Folder path
run: echo 'STMDFOLDERPATH=/home/runner/work/sl-1-0-sensor-model-repository-template/sl-1-0-sensor-model-repository-template/doc' >> $GITHUB_ENV && echo $STMDFOLDERPATH
- name: show report
run: cat No.1.ImplementationPhase.IntegrateSimulation.cdkResult.json
- name: send to outputs
id: outputStep
run: echo "summary=$(cat
No.1.ImplementationPhase.IntegrateSimulation.cdkResult.json)" >>
$GITHUB_OUTPUT
48 changes: 48 additions & 0 deletions .github/workflows/all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: process-phase-testing-pipelines
on:
push:
jobs:
run-all-workflows:
runs-on: ubuntu-20.04
needs:
- No_0_RequirementsPhase_DefineModelRequirements
- No_1_ImplementationPhase_IntegrateSimulation
steps:
- name: checkout simulation data
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.WRITE_WORKFLOW }}
- name: install prerequisites
run: >
npm install yaml --prefix ./workflow_utils

npm install ./workflow_utils/stmd-crud --prefix
./workflow_utils/stmd-crud
- name: make output folder
run: mkdir -p ./.github/outputs
- env:
GithubBranch: ${{github.ref_name}}
GithubRepoName: ${{github.event.repository.name}}
GithubOwner: ${{github.repository_owner}}
No_0_RequirementsPhase_DefineModelRequirements: ${{needs.No_0_RequirementsPhase_DefineModelRequirements.outputs.summary}}
No_1_ImplementationPhase_IntegrateSimulation: ${{needs.No_1_ImplementationPhase_IntegrateSimulation.outputs.summary}}
allActionList: No_0_RequirementsPhase_DefineModelRequirements,No_1_ImplementationPhase_IntegrateSimulation,
run: node ./workflow_utils/results.js -s -o summary.md && cat summary.md >>
$GITHUB_STEP_SUMMARY
- name: push results
run: |
git config --global user.name "Add results"
git config --global user.email "[email protected]"

git add ./.github/outputs
git commit -m "Add results [actions skip]"
git push
No_0_RequirementsPhase_DefineModelRequirements:
uses: openMSL/sl-1-0-sensor-model-repository-template/.github/workflows/No.0.RequirementsPhase.DefineModelRequirements.yaml@84-add-stmd-file-according-to-cmp
secrets:
WRITE_WORKFLOW: ${{secrets.WRITE_WORKFLOW}}
No_1_ImplementationPhase_IntegrateSimulation:
uses: openMSL/sl-1-0-sensor-model-repository-template/.github/workflows/No.1.ImplementationPhase.IntegrateSimulation.yaml@84-add-stmd-file-according-to-cmp
secrets:
WRITE_WORKFLOW: ${{secrets.WRITE_WORKFLOW}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@
.vscode/
.editorconfig
__pycache__

# GAIAX CI
gaiax-ci/
25 changes: 25 additions & 0 deletions doc/data/cert_ahmann.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-----BEGIN CERTIFICATE-----
MIIENzCCAx+gAwIBAgIURfMlTJ+E8y+XBS3oudOk0z75+jQwDQYJKoZIhvcNAQEL
BQAwgaoxCzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZN
dW5pY2gxHjAcBgNVBAoMFVNFVExhYnMgUmVzZWFyY2ggR21iSDETMBEGA1UECwwK
QXV0b21vdGl2ZTEYMBYGA1UEAwwPTWF1cml6aW8gQWhtYW5uMSkwJwYJKoZIhvcN
AQkBFhptYXVyaXppby5haG1hbm5Ac2V0bGFicy5kZTAeFw0yMzAyMjMxNTMwNTla
Fw0yNDEyMzExNTMwNTlaMIGqMQswCQYDVQQGEwJERTEQMA4GA1UECAwHQmF2YXJp
YTEPMA0GA1UEBwwGTXVuaWNoMR4wHAYDVQQKDBVTRVRMYWJzIFJlc2VhcmNoIEdt
YkgxEzARBgNVBAsMCkF1dG9tb3RpdmUxGDAWBgNVBAMMD01hdXJpemlvIEFobWFu
bjEpMCcGCSqGSIb3DQEJARYabWF1cml6aW8uYWhtYW5uQHNldGxhYnMuZGUwggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSmUihmubtTl5DHeuo1xntCESm
hfZESRXVIgtKwQnHwcr4Y0KHB7No6MxEZN88f5Kdq9qa7yU1CmjlmBQvvFhLoyZE
Fciv2JH1lKPPY0hpa1aUMulygQrMBoWhI7C4DDg5GB8D2FmkMHKWvTzXqLIkQLpT
esKN64wTT44ElTjZaNLKpkH79sDbGzG8pxdtBE5abTainSBbpCFpt9or8Kc2PL74
smd24IfAcfCq+71arCQXFaW0cIAiXHWbSBvQGmAN5s+hcZ97P6VEQV5MMjRPESF4
toH1RahYLUYT18VICzWVnbo2eAxYZgAsgepCD/sAtAYBLbzxzip45oVIzUpfAgMB
AAGjUzBRMB0GA1UdDgQWBBQQjy3fPlVqebstqr2+s7s7MhorcjAfBgNVHSMEGDAW
gBQQjy3fPlVqebstqr2+s7s7MhorcjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3
DQEBCwUAA4IBAQAShChBMOU89sy+cIElFgtd0gg33HgIWB3dTNqKS1tyKW95y0Hk
iTOSx31DVj+dT/bcqtrqNUqiad+iVp4QZLR5TlWTugxT958VTvm+KhPln7ovk+En
lvjWwFK3/wPEH9d+rTR7c20jlSl0MIfLXVTU7/8AkkbOZYHriH7AAoulldmc1s4n
L0e1sAhhL2AQBk6RR0FLLJTrXgKtdj3UxzYCnC/WTT6fj37KY9bVyXxQU46luumW
UMTNLhOOx1SILybhfkpMPff7VBP+9cN/qmk3dgT0LcBo9G/KyHpHs4TGWlpsPZTN
fsV1NFOtAz3c8ye83Pl98RkKn4uZi0Xdwy/D
-----END CERTIFICATE-----
1 change: 1 addition & 0 deletions doc/data/expertStatement_req_m_01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"content":{"result":true,"log":"The requirement with ID #req_m_01 is necessary, unambiguous, complete, singular, achievable, and verifiable."},"signature":"cd61a6dd9c56d7e4a14fdd2f590b8f45cb8bd18c4ba9fd67570f35b7729b6fbdabaae2f27d953d372064e7e8dcc5c67825393bf129838c31e2841aeb18786d2ea58800ac1209bc55d66406cc7b437471809e32866ecece40f3fe44422234182fec38379f38adafe1217ed50655e63421bded321fcb2f4cfaff36cf84df2f74ddace9c0a8375a11bec6e4dbefa84c50be591b6353dbfc3120716d2aca95b7ad28669bf2c82c8b1f40634793a9c967e1f7c610e76131712eee17d15844731fa3e7e55221f13fbf54a1d187c044796e8e3a035fa3a1631b100c9e3ab28bee569bacea9bfba7fc304757ee5623c3141070bfd0e688cc0a2ae78fd7d20113c714e97e","hash_algorithm":"SHA256","signature_encoding":"hex"}
Loading
Loading