Skip to content

Commit d05cb3e

Browse files
authored
Merge pull request eclipse-score#2 from eclipse-score/lt_initial_contribution
init: initial content for the web page
2 parents 58e0a7a + a0e84c6 commit d05cb3e

32 files changed

+1996
-2
lines changed

.bazelrc

Whitespace-only changes.

.bazelversion

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.4.0

.github/actions/gitlint/action.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Gitlint Action"
2+
description: "An action to install and run Gitlint on PR commits"
3+
inputs:
4+
pr-number:
5+
description: "Pull Request number used to fetch commits"
6+
required: true
7+
base-branch:
8+
description: "Base branch to compare commits against (default: origin/main)"
9+
default: "origin/main"
10+
required: false
11+
runs:
12+
using: "docker"
13+
image: "jorisroovers/gitlint:0.19.1"
14+
entrypoint: /bin/sh
15+
args:
16+
- -c
17+
- |
18+
git config --global --add safe.directory /github/workspace && \
19+
git fetch origin +refs/heads/main:refs/remotes/origin/main && \
20+
git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \
21+
gitlint --commits origin/main..HEAD

.github/workflows/copyright.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Copyright checks
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize]
5+
merge_group:
6+
types: [checks_requested]
7+
jobs:
8+
copyright-check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4.2.2
13+
- name: Setup Bazel
14+
uses: bazel-contrib/setup-bazel@0.9.1
15+
- name: Run copyright checks
16+
run: |
17+
bazel run //:copyright.check

.github/workflows/docs.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Documentation build
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize]
5+
push:
6+
branches:
7+
- main
8+
merge_group:
9+
types: [checks_requested]
10+
jobs:
11+
docs-build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pull-requests: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4.2.2
18+
- name: Setup Bazel
19+
uses: bazel-contrib/setup-bazel@0.9.1
20+
- name: Build documentation
21+
run: |
22+
bazel build //docs:github-pages && cp bazel-bin/docs/github-pages.tar .
23+
- name: Upload artifact for deployment
24+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
25+
uses: actions/upload-artifact@v4.4.0
26+
with:
27+
name: github-pages
28+
path: ${{ github.workspace }}/github-pages.tar
29+
retention-days: 1
30+
if-no-files-found: error
31+
- name: Upload artifact for pull request link
32+
if: github.event_name == 'pull_request'
33+
id: upload-artifact-pr
34+
uses: actions/upload-artifact@v4.4.0
35+
with:
36+
name: github-pages-${{ github.sha }}
37+
path: ${{ github.workspace }}/github-pages.tar
38+
retention-days: 1
39+
if-no-files-found: error
40+
- name: Comment artifact URL
41+
if: github.event_name == 'pull_request'
42+
run: |
43+
gh pr comment ${{ github.event.pull_request.number }} \
44+
--body "Documentation artifact: ${{ steps.upload-artifact-pr.outputs.artifact-url }}"
45+
env:
46+
GH_TOKEN: ${{ github.token }}
47+
docs-deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
permissions:
52+
pages: write
53+
id-token: write
54+
runs-on: ubuntu-latest
55+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
56+
needs: docs-build
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4.0.5

.github/workflows/format.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Formatting checks
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize]
5+
merge_group:
6+
types: [checks_requested]
7+
jobs:
8+
formatting-check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4.2.2
13+
- name: Setup Bazel
14+
uses: bazel-contrib/setup-bazel@0.9.1
15+
- name: Run formatting checks
16+
run: |
17+
bazel test //:format.check

.github/workflows/gitlint.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Gitlint check
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
jobs:
6+
lint-commits:
7+
name: check-commit-messages
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
- name: Run Gitlint Action
15+
if: ${{ github.event_name == 'pull_request' }}
16+
uses: ./.github/actions/gitlint
17+
with:
18+
pr-number: ${{ github.event.number }}
19+
base-branch: ${{ github.event.pull_request.base.ref }}

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Bazel
2+
bazel-*
3+
MODULE.bazel.lock
4+
5+
# Ruff
6+
.ruff_cache

.gitlint

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Available rules:
2+
#
3+
# T1: title-max-length
4+
# T2: title-trailing-whitespace
5+
# T3: title-trailing-punctuation (disabled)
6+
# T4: title-hard-tab
7+
# T5: title-must-not-contain-word (disabled)
8+
# T6: title-leading-whitespace
9+
# T7: title-match-regex (disabled)
10+
# B1: body-max-line-length
11+
# B2: body-trailing-whitespace
12+
# B3: body-hard-tab
13+
# B4: body-first-line-empty
14+
# B5: body-min-length (disabled)
15+
# B6: body-is-missing (disabled)
16+
# B7: body-changed-file-mention (disabled)
17+
#
18+
# See http://jorisroovers.github.io/gitlint/rules/ for a full description.
19+
20+
# Ignore some default rules and enable regex style searching
21+
[general]
22+
ignore=T3,T5,B1,B5,B7
23+
regex-style-search=true
24+
25+
# Maximum length of the title
26+
[title-max-length]
27+
line-length=72
28+
29+
[title-match-regex]
30+
regex=^[a-z_-]+: .+$
31+
32+
# First line of the commit message body must be empty. (second line of the commit message)
33+
[body-first-line-empty]
34+
35+
# Body must contain a reference to an issue
36+
# 'see' will act as a form of reference from commits to issues without closing them.
37+
[body-match-regex]
38+
regex=Issue-ref: (see|close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) #(\d+)
39+
40+
#Ignores the title if it starts with Revert or Merge
41+
[ignore-by-title]
42+
regex=(^Revert |^Merge )

BUILD

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2024 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
14+
test_suite(
15+
name = "format.check",
16+
tests = ["//tools/format:format.check"],
17+
)
18+
19+
alias(
20+
name = "format.fix",
21+
actual = "//tools/format:format.fix",
22+
)
23+
24+
alias(
25+
name = "copyright.check",
26+
actual = "//tools/cr_checker:copyright.check",
27+
)
28+
29+
alias(
30+
name = "copyright.fix",
31+
actual = "//tools/cr_checker:copyright.fix",
32+
)
33+
34+
filegroup(
35+
name = "repo_directories",
36+
srcs = [
37+
"docs",
38+
"tools",
39+
],
40+
visibility = [
41+
"//tools/cr_checker:__subpackages__",
42+
],
43+
)
44+
45+
exports_files([
46+
"MODULE.bazel",
47+
"BUILD",
48+
])

LICENSE

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2024 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.

MODULE.bazel

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
module(
2+
name = "score_platform",
3+
version = "0.1",
4+
compatibility_level = 0,
5+
)
6+
7+
###############################################################################
8+
#
9+
# Python version
10+
#
11+
###############################################################################
12+
bazel_dep(name = "rules_python", version = "0.37.2")
13+
14+
PYTHON_VERSION = "3.12"
15+
16+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
17+
python.toolchain(
18+
is_default = True,
19+
python_version = PYTHON_VERSION,
20+
)
21+
use_repo(python)
22+
23+
###############################################################################
24+
#
25+
# pip dependencies
26+
#
27+
###############################################################################
28+
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
29+
pip.parse(
30+
hub_name = "pip_sphinx",
31+
python_version = PYTHON_VERSION,
32+
requirements_lock = "//docs:requirements_lock.txt",
33+
)
34+
use_repo(pip, "pip_sphinx")
35+
36+
###############################################################################
37+
#
38+
# Packaging dependencies
39+
#
40+
###############################################################################
41+
bazel_dep(name = "rules_pkg", version = "1.0.1")
42+
43+
###############################################################################
44+
#
45+
# Buildifier dependency
46+
# Provides formatting and linting of Bazel files.
47+
#
48+
###############################################################################
49+
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
50+
51+
###############################################################################
52+
#
53+
# Generic linting and formatting rules
54+
#
55+
###############################################################################
56+
bazel_dep(name = "aspect_rules_lint", version = "1.0.3")

NOTICE

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Notices for Eclipse Score
2+
3+
This content is produced and maintained by the Eclipse Score project.
4+
5+
* Project home: https://projects.eclipse.org/projects/automotive.score
6+
7+
## Trademarks
8+
9+
Eclipse Score and Score are trademarks of the Eclipse Foundation.
10+
Eclipse, and the Eclipse Logo are registered trademarks of
11+
the Eclipse Foundation.
12+
13+
## Copyright
14+
15+
All content is the property of the respective authors or their employers.
16+
For more information regarding authorship of content, please consult the
17+
listed source code repository logs.
18+
19+
## Declared Project Licenses
20+
21+
This program and the accompanying materials are made available under the terms
22+
of the Apache License Version 2.0 which is available at
23+
https://www.apache.org/licenses/LICENSE-2.0.
24+
25+
SPDX-License-Identifier: Apache-2.0
26+
27+
## Source Code
28+
29+
The project maintains the following source code repositories:
30+
31+
* TBD
32+
33+
## Third party Content
34+
35+
TBD

README.md

+29-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
1-
# eclipse-score.github.io
2-
The landing page website for the Score project
1+
# Score landing page
2+
3+
## Building
4+
5+
### Supported environment
6+
The build currently supports Linux environments.
7+
8+
### Use bazelisk for bazel version management
9+
Follow [instructions](https://github.com/bazelbuild/bazelisk) and setup bazelisk to manage your bazel version based on the .bazelversion file.
10+
11+
### Check and fix formatting
12+
```
13+
$ bazel test //:format.check
14+
$ bazel run //:format.fix
15+
```
16+
17+
## Documentation
18+
19+
Use //docs:docs target to build the documentation.
20+
```
21+
$ bazel build //docs:docs
22+
```
23+
24+
The output directory can be found under ```bazel-bin/docs/docs/_build/html```.
25+
26+
If you need to update pip dependencies, after modifying the requirements file, regenerate the lock file:
27+
```
28+
bazel run //docs:requirements.update
29+
```

0 commit comments

Comments
 (0)