From 16ad3a1543a5bcd38b6e1b2f254fa17c242a2da7 Mon Sep 17 00:00:00 2001 From: Pawel Palucki Date: Wed, 20 Dec 2023 12:34:02 +0100 Subject: [PATCH] Celine config/report --- .celine/BuildConfig.json | 27 +++++++++++++++ .celine/report.j2 | 73 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 38 +++++++++++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 .celine/BuildConfig.json create mode 100644 .celine/report.j2 create mode 100644 .github/workflows/ci.yml diff --git a/.celine/BuildConfig.json b/.celine/BuildConfig.json new file mode 100644 index 00000000..1c01b36f --- /dev/null +++ b/.celine/BuildConfig.json @@ -0,0 +1,27 @@ +{ + "IngredientName": "gardener-extension-cri-resmgr", + "Description": "Gardener extension controller for the https://github.com/intel/cri-resource-manager container runtime proxy.", + "BuildInfo": { + "Name": "ge-crirm", + "FullName": "gardener-extension-cri-resmgr", + "SDL": [ + { + "ID": "19289", + "URL": "https://sdl-e.app.intel.com/project?id=628822ec-155a-4ecb-b181-773d3fc0a324", + "Submitter": "sys_owrscan" + } + ], + "ServerURL": "https://onebkc.intel.com", + "Type": "onebkc" + }, + "BinaryScan": { + "ServerURL": "https://bdba001.icloud.intel.com", + "ServerGroup": "57" + }, + "Protex": [ + { + "Server": "https://gerprotex012.devtools.intel.com/", + "ProjectID": "c_gardener-extension-cri-rm_31307" + } + ] +} diff --git a/.celine/report.j2 b/.celine/report.j2 new file mode 100644 index 00000000..eb055a70 --- /dev/null +++ b/.celine/report.j2 @@ -0,0 +1,73 @@ +### Report for {{ params.commit_id }} + +#### Summary +Date: {{ params.run_date }} + +||| +|-|-| +|Project name|{{ params.project_name }}| +|Trigger|{{ params.run_cause }}| +|Project repo|{{ params.repository }}| +|Branch|{{ params.branch }}| +|Diff|{{ params.compare_url }}| +|Build commit id|{{ params.commit_id }}| +|Status|{{ params.status }}| + +{% if params.errors %} +#### Errors + +{{ params.errors }} + +{% endif %} + +#### Generated artifacts +URL: [{{ user_payload.artifact_name }}]({{ user_payload.artifact_url }}) + +{% if user_payload.artifacts %} +#### Generated artifacts +{%- for artifact in user_payload.artifacts %} + - [{{ artifact.source }}]({{ artifact.target }}) +{%- endfor %} + +{% endif %} + +{% if user_payload.scans %} +#### Scans summary + +Build config: {{ user_payload.build_config }}
+SDL upload: {{ user_payload.sdl_upload}} + +|Scan|Status|Report| +|-|-|-| +{%- for scan_name, scan_info in user_payload.scans.items() %} +|{{ scan_name }}|{{ scan_info.status }}|{{ scan_info.report }}| + +{%- endfor %} + +#### Protex scans + +{% set number_scan = user_payload.scans['protex'].report | replace("[Obl_Report_protex_c_intelmemorylatencycheckerintelmlc_23388.html](https://ubit-artifactory-or.intel.com/artifactory/celine-or-local/MLC/compliance_scans/", "") | replace("/protex/Obl_Report_protex_c_intelmemorylatencycheckerintelmlc_23388.html)", "") %} +Scan number: {{ number_scan }} + +{% set url = 'https://ubit-artifactory-or.intel.com/artifactory/celine-or-local/MLC/compliance_scans/' %} +{% set protex_reports = [ +'COS_Report_protex_c_intelmemorylatencycheckerintelmlc_23388.html', +'COS_Report_protex_c_intelmemorylatencycheckerintelmlc_23388.xlsx', +'Obl_Report_protex_c_intelmemorylatencycheckerintelmlc_23388.html', +'Obl_Report_protex_c_intelmemorylatencycheckerintelmlc_23388.xlsx', +'protex_c_intelmemorylatencycheckerintelmlc_23388.html', +'protex_c_intelmemorylatencycheckerintelmlc_23388.xml', +'protex_c_intelmemorylatencycheckerintelmlc_23388_results.xml', +'protex_summary_c_intelmemorylatencycheckerintelmlc_23388.xml' +] +%} + +|Report| +|-| +{%- for report in protex_reports %} +|{{ '[' + report + '](' + url + number_scan + '/protex/' + report + ')' }}| +{%- endfor %} + +{% endif %} + +Celine report for {{ params.project_name }}. Go to [Logs]({{ params.current_job_url }}). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..315c3be0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: Hello World Example Using reusable workflow + +# Add your triggers here +# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows +on: + workflow_dispatch: + + push: + branches: [ master ] + + pull_request: + branches: [ master ] + + release: + types: + - prereleased + - edited + +jobs: + call-ci-workflow: + uses: intel-innersource/frameworks.devops.celine.celine/.github/workflows/makefile_ci.yml@v2 + with: + project_name: gardener-extension-cri-resmgr + makefile_path: Makefile + runner_group_name: celine + image: amr-registry.caas.intel.com/celine/gecrirm:latest + buildconfig_path: BuildConfig.json + build_artifacts_path: gecrirm/build + artifactory_repository: celine-or-local + wiki: frameworks.devops.celine.celine.wiki + report_template_name: report.j2 + mail_recipients: pawel.palucki@intel.com + secrets: + artifactory_api_token: ${{ secrets.ARTIFACTORY_API_TOKEN }} + jenkins_user: ${{ secrets.JENKINS_USER }} + jenkins_api_token: ${{ secrets.JENKINS_API_TOKEN }} + celine_ctx_address: ${{ secrets.CELINE_CTX_ADDRESS }} + celine_access_token: ${{ secrets.CELINE_ACCESS_TOKEN }}