This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14e947c
commit 32287a7
Showing
186 changed files
with
22,769 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[bandit] | ||
skips: B101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# ******************************************************************************** | ||
# Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License 2.0 which is available at | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# *******************************************************************************/ | ||
|
||
--- | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
ColumnLimit: 120 | ||
IndentWidth: 4 | ||
PenaltyBreakBeforeFirstCallParameter: 1 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 200 | ||
Standard: Cpp11 | ||
TabWidth: 4 | ||
UseTab: Never | ||
BreakConstructorInitializers: BeforeComma | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
... | ||
|
||
--- | ||
Language: Proto | ||
BasedOnStyle: Google | ||
ColumnLimit: 120 | ||
IndentWidth: 4 | ||
UseTab: Never | ||
AlignConsecutiveAssignments: true | ||
--- |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
# * | ||
# * See the NOTICE file(s) distributed with this work for additional | ||
# * information regarding copyright ownership. | ||
# * | ||
# * This program and the accompanying materials are made available under the | ||
# * terms of the Apache License 2.0 which is available at | ||
# * http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
|
||
apiVersion: dapr.io/v1alpha1 | ||
kind: Configuration | ||
metadata: | ||
name: config | ||
spec: | ||
# tracing: | ||
# samplingRate: "15" | ||
# zipkin: | ||
# endpointAddress: http://localhost:9411/api/v2/spans | ||
features: | ||
- name: proxy.grpc | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
# * | ||
# * See the NOTICE file(s) distributed with this work for additional | ||
# * information regarding copyright ownership. | ||
# * | ||
# * This program and the accompanying materials are made available under the | ||
# * terms of the Apache License 2.0 which is available at | ||
# * http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
|
||
# Download base image of Ubuntu | ||
FROM ghcr.io/eclipse/kuksa.val.services/oci_kuksa-val-services-ci:prerelease | ||
|
||
# If you get proxy errors, make sure Docker is configured correctly. | ||
# Hint: https://dev.to/zyfa/setup-the-proxy-for-dockerfile-building--4jc8 | ||
|
||
USER root | ||
|
||
# To prevent interactive shells | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install basic utils needed inside devcontainer | ||
RUN apt-get update && \ | ||
apt-get install -qqy curl wget zip && \ | ||
apt-get install -qqy git && \ | ||
apt-get install -qqy bash && \ | ||
apt-get install -qqy xz-utils && \ | ||
apt-get install -qqy apt-transport-https | ||
|
||
# Set the locale | ||
RUN apt-get update && \ | ||
apt-get install -qqy locales locales-all | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
||
# Set timezone inside Docker container | ||
ENV TZ=UTC | ||
RUN echo $TZ > /etc/timezone && \ | ||
apt-get update && apt-get install -qqy tzdata && \ | ||
rm /etc/localtime && \ | ||
dpkg-reconfigure -f noninteractive tzdata | ||
|
||
#TODO: fix and uncomment: This is needed for local development under linux | ||
#USER dockeruser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "oci_kuksa-val-services-dev", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"runArgs": ["--init", "--privileged"], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"http.proxyStrictSSL": false | ||
}, | ||
"features": { | ||
"docker-in-docker": { | ||
"version": "latest", | ||
"moby": true | ||
} | ||
}, | ||
"extensions": [ | ||
"yzhang.markdown-all-in-one", | ||
"arturock.gitstash", | ||
"eamodio.gitlens", | ||
"streetsidesoftware.code-spell-checker", | ||
"twxs.cmake" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.devcontainer/ | ||
.github/ | ||
.git | ||
.vscode/ | ||
tools/ | ||
report/ | ||
*.tar | ||
**/build/ | ||
**/build_seat_controller/ | ||
**/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
.venv, | ||
# Ignore generated *_pb2.py files | ||
gen_proto, *_pb2* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.sh text eol=lf | ||
seat_service/src/lib/seat_adjuster/seat_controller/tools/* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
# * | ||
# * See the NOTICE file(s) distributed with this work for additional | ||
# * information regarding copyright ownership. | ||
# * | ||
# * This program and the accompanying materials are made available under the | ||
# * terms of the Apache License 2.0 which is available at | ||
# * http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
# This configures Dependabot version updates, to keep dependencies up to date. | ||
# Dependabot security updates are configured differently, | ||
# see: https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/hvac_service" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/integration_test" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/seat_service" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/hvac_service" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/tools" | ||
schedule: | ||
interval: "monthly" | ||
# conan package-ecosystem is for C++ is not supported yet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Continuous integration | ||
|
||
## Naming of workflows | ||
|
||
* for sub components like hvac_service and seat_service use pattern: | ||
**\<subcomponent>_\<action> eg: hvac_service** | ||
|
||
* for overall tasks use pattern: | ||
**\<action> eg: release** | ||
|
||
## Naming of Tags | ||
|
||
* Release tags need to be in the following form: | ||
**v\<mayor>.\<minor>.\<bugfix>\* eg: v1.2.1, v2.0.0alpha** | ||
## Workflow and branching model | ||
![ci_workflow](./doc/ci_workflow.svg) | ||
|
||
|
||
## Naming of artifacts | ||
|
||
Artifacts result from the workflow are used in other workflows and might be published directly to a release page, therefore their naming matters. | ||
In general the naming shall follow: **<type>(_<sub-type>)_<componenent-name>.tar/zip** | ||
|
||
* Application binaries: **bin_\<component-name\>_<hwarch>_<buildtype>.tar**, e.g. bin_vservice-seat_x86_64_release.tar.gz | ||
* Containers layers: **oci_\<component-name\>.tar**, e.g. oci_vservice-seat.tar | ||
* Test result reports: **report_test_\<component-name\>**, e.g. report_test_vservice-seat-ctl | ||
* Test coverage reports: **report_codecov_\<component-name\>.\**, e.g. report_codecov_vservice-seat-ctl | ||
* Documentation: **docu_\<component-name\>.\**, e.g: docu_vservice-seat | ||
|
||
## How to create a new release | ||
1. Adapt the version tags in all needed files, (e.g.: for v0.15.0) via executing | ||
* ``./prepare_release.sh 0.15.0`` | ||
2. tag a main branch version with a release tag | ||
* This trigger a github workflow which automatically creates a draft release | ||
3. Publish the release on the repo webpage | ||
* navigate to the repo webpage -> Release -> edited the create draft -> Publish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
# * | ||
# * See the NOTICE file(s) distributed with this work for additional | ||
# * information regarding copyright ownership. | ||
# * | ||
# * This program and the accompanying materials are made available under the | ||
# * terms of the Apache License 2.0 which is available at | ||
# * http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
|
||
name: dev-container-build | ||
|
||
on: | ||
push: | ||
paths: | ||
- "tools/Dockerfile" | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "tag of the docker container, eg:latest, v0.2.1" | ||
required: false | ||
default: "latest" | ||
workflow_call: | ||
inputs: | ||
tag: | ||
description: "tag of the docker container, eg:latest, v0.2.1" | ||
type: string | ||
required: false | ||
default: "latest" | ||
|
||
jobs: | ||
build: | ||
runs-on: [ubuntu-latest] | ||
|
||
steps: | ||
- name: adding github workspace as safe directory | ||
run: git config --global --add safe.directory $GITHUB_WORKSPACE | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- id: repository-name-adjusted | ||
name: Prepare repository name in lower case for docker upload. This supports repository names in mixed case | ||
uses: ASzc/change-string-case-action@v2 | ||
with: | ||
string: ${{ github.repository }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Runs docker Build | ||
- name: Run docker Build | ||
# github.event.inputs.tag - used when triggered by workflow_dispatch | ||
# inputs.tag - used when triggered by workflow_call | ||
run: | | ||
docker build --build-arg version=latest --build-arg USER_ID=0 --build-arg GROUP_ID=0 -t ghcr.io/${{ steps.repository-name-adjusted.outputs.lowercase }}/oci_kuksa-val-services-ci:${{ github.event.inputs.tag }}${{ inputs.tag }} -f tools/Dockerfile . | ||
# push docker | ||
- name: Push docker | ||
# github.event.inputs.tag - used when triggered by workflow_dispatch | ||
# inputs.tag - used when triggered by workflow_call | ||
run: | | ||
docker push ghcr.io/${{ steps.repository-name-adjusted.outputs.lowercase }}/oci_kuksa-val-services-ci:${{ github.event.inputs.tag }}${{ inputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
# * | ||
# * See the NOTICE file(s) distributed with this work for additional | ||
# * information regarding copyright ownership. | ||
# * | ||
# * This program and the accompanying materials are made available under the | ||
# * terms of the Apache License 2.0 which is available at | ||
# * http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
|
||
name: dev-container-build-prerelease | ||
|
||
on: | ||
push: | ||
paths: | ||
- "tools/Dockerfile" | ||
- ".github/workflows/dev_container_build_prerelease.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
call-dev-container-build: | ||
uses: ./.github/workflows/dev_container_build.yml | ||
with: | ||
tag: "prerelease" |
Oops, something went wrong.