Skip to content

Commit dc69072

Browse files
Fix artifact name, add ocaas scan
1 parent 7781010 commit dc69072

File tree

4 files changed

+114
-1
lines changed

4 files changed

+114
-1
lines changed

.github/actions/build-docker-image/action.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright 2022 Contributors to the Eclipse Foundation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
117
name: Build and push docker container
218

319
inputs:

.github/actions/build-native-binary/action.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright 2022 Contributors to the Eclipse Foundation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
117
name: Build native binaries
218

319
inputs:

.github/workflows/main.yaml

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright 2022 Contributors to the Eclipse Foundation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
117
name: CI
218

319
on:
@@ -98,5 +114,5 @@ jobs:
98114
prerelease: true
99115
automatic_release_tag: build_${{ github.run_number }}
100116
title: "Build ${{ github.run_number }}"
101-
files: "**/sua-${{ matrix.arch }}-build-${{ github.run_number }}.tar.gz"
117+
files: "**/sua-*-build-${{ github.run_number }}.tar.gz"
102118

.github/workflows/ocaas.yaml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2022 Contributors to the Eclipse Foundation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
17+
name: OCaaS Compliance checks
18+
19+
on:
20+
push:
21+
branches: [ main ]
22+
pull_request:
23+
branches: [ main ]
24+
workflow_dispatch:
25+
26+
jobs:
27+
ocaas-scan:
28+
runs-on: ubuntu-latest
29+
if: github.repository_owner == 'SoftwareDefinedVehicle'
30+
steps:
31+
- name: setup env variables for OCaaS
32+
run: |
33+
echo "VCS_REVISION=${{ github.ref_name }}" >> $GITHUB_ENV
34+
- name: use different VCS_REVISION for pull requests
35+
if: github.event_name == 'pull_request'
36+
run: |
37+
echo "Workflow triggered by pull request. Scanning source branch only as merge revisions are not supported."
38+
echo "VCS_REVISION=${{ github.head_ref }}" >> $GITHUB_ENV
39+
- name: OCaaS Scans
40+
id: ocaas
41+
uses: docker://osmipublic.azurecr.io/ocaas-ci:latest
42+
continue-on-error: true # Built artifacts also should also be uploaded if the scan finds violations.
43+
with:
44+
args: auth generate-token run start download
45+
env:
46+
OCAAS_USERNAME: ${{ secrets.OCAAS_USERNAME }}
47+
OCAAS_PASSWORD: ${{ secrets.OCAAS_PASSWORD }}
48+
PROJECT_NAME: "Project LEDA - sdv-self-update-agent"
49+
PIPELINE_ID: 377 # Your pipeline ID. Provided by the OSMI team.
50+
VCS_URL: ${{ github.server_url }}/${{ github.repository }}.git
51+
# VCS_REVISION: is defined before
52+
APPLICATION_CATEGORY: "BT11"
53+
BLOCKING: true
54+
REPORT_FILES: DISCLOSURE_DOCUMENT_PDF,VULNERABILITY_REPORT_PDF,SCAN_REPORT_WEB_APP_HTML
55+
OUTPUT_DIR: reports/
56+
- name: Upload reports
57+
id: upload
58+
uses: actions/upload-artifact@v3
59+
with:
60+
name: reports
61+
path: reports/
62+
- name: Check for violations
63+
if: steps.ocaas.outcome != 'success' || steps.upload.outcome != 'success'
64+
run: exit 1
65+

0 commit comments

Comments
 (0)