Skip to content

Commit ffaf62d

Browse files
author
Dennis Labordus
committed
Merge branch 'main' into merge_upstream_v090
2 parents 600166a + 5d219e0 commit ffaf62d

File tree

127 files changed

+7383
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+7383
-399
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: 2021 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
version: 2
6+
7+
updates:
8+
# Maintain dependencies for GitHub Actions
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
open-pull-requests-limit: 5

.github/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
changelog:
6+
exclude:
7+
labels:
8+
- wontfix
9+
- duplicate
10+
- invalid
11+
categories:
12+
- title: New Features
13+
labels:
14+
- enhancement
15+
- title: Bugfixes
16+
labels:
17+
- bug
18+
- title: Tooling changes
19+
labels:
20+
- tooling
21+
- title: Dependency updates
22+
labels:
23+
- dependencies
24+
- title: Other Changes
25+
labels:
26+
- "*"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SPDX-FileCopyrightText: 2021 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: CC-BY-4.0
4+
5+
name: Add issues and pull request to project boards
6+
7+
on: [ issues, pull_request ]
8+
9+
jobs:
10+
github-actions-automate-projects:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: add-new-issues-to-repository-based-project-column
14+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
15+
if: github.event_name == 'issues' && github.event.action == 'opened'
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-open-scd/projects/1
19+
GITHUB_PROJECT_COLUMN_NAME: To do
20+
- name: add-new-pull-request-to-repository-based-project-column
21+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
22+
if: github.event_name == 'pull_request' && github.event.action == 'opened'
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-open-scd/projects/1
26+
GITHUB_PROJECT_COLUMN_NAME: To do
27+
- name: add-new-issues-to-organization-based-project-column
28+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
29+
if: github.event_name == 'issues' && github.event.action == 'opened'
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
32+
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/1
33+
GITHUB_PROJECT_COLUMN_NAME: To do
34+
- name: add-new-pull-request-to-organization-based-project-column
35+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
36+
if: github.event_name == 'pull_request' && github.event.action == 'opened'
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
39+
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2
40+
GITHUB_PROJECT_COLUMN_NAME: To do

.github/workflows/build-and-deploy.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build Project
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 15
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Docker Buildx
22+
id: buildx
23+
if: ${{ github.event_name == 'pull_request' }}
24+
uses: docker/setup-buildx-action@v1
25+
- name: Cache Docker Register
26+
if: ${{ github.event_name == 'pull_request' }}
27+
uses: actions/cache@v2
28+
with:
29+
path: /tmp/.buildx-cache
30+
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
31+
32+
- name: Use Node.js 14.x
33+
uses: actions/[email protected]
34+
with:
35+
node-version: '14.x'
36+
37+
- name: Test application with npm
38+
if: ${{ github.event_name == 'push' }}
39+
run: |
40+
npm ci
41+
npm run-script test
42+
43+
- name: Build application with npm
44+
if: ${{ github.event_name == 'pull_request' }}
45+
run: |
46+
npm ci
47+
npm run-script build
48+
- name: Build docker image
49+
if: ${{ github.event_name == 'pull_request' }}
50+
uses: docker/build-push-action@v2
51+
with:
52+
# Set the context to use the current directory and not execute it's own git checkout.
53+
context: .
54+
push: false
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SPDX-FileCopyrightText: 2021 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Release Project
6+
7+
on:
8+
release:
9+
types: [released]
10+
11+
jobs:
12+
push_to_registry:
13+
name: Build and publish
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Docker Buildx
20+
id: buildx
21+
uses: docker/setup-buildx-action@v1
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v1
24+
with:
25+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
26+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
27+
- name: Cache Docker Register
28+
uses: actions/cache@v2
29+
with:
30+
path: /tmp/.buildx-cache
31+
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
32+
33+
- name: Extract tag name
34+
id: extract_tagname
35+
shell: bash
36+
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
37+
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
38+
- name: Use Node.js 14.x
39+
uses: actions/[email protected]
40+
with:
41+
node-version: '14.x'
42+
43+
- name: Build application with npm
44+
run: |
45+
npm ci
46+
npm run-script build
47+
- name: Build and push docker image to Docker Hub
48+
uses: docker/build-push-action@v2
49+
with:
50+
# Set the context to use the current directory and not execute it's own git checkout.
51+
context: .
52+
push: true
53+
# Tag the images using the tagname and also latest.
54+
tags: |
55+
lfenergy/compas-open-scd:${{ steps.extract_tagname.outputs.tagname }}
56+
lfenergy/compas-open-scd:latest

.github/workflows/test-and-build.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM nginx:latest
2+
COPY build/. /usr/share/nginx/html/

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# `OpenSCD`
1+
# `OpenSCD CoMPAS Edition`
22

3-
[![Build Status](https://travis-ci.org/openscd/open-scd.svg?branch=main)](https://travis-ci.org/openscd/open-scd)
4-
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fopenscd%2Fopen-scd.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fopenscd%2Fopen-scd?ref=badge_shield)
5-
[![Built with open-wc recommendations](https://img.shields.io/badge/built%20with-open--wc-blue.svg)](https://github.com/open-wc)
3+
[![NodeJS Build Github Action Status](<https://img.shields.io/github/workflow/status/com-pas/compas-open-scd/NodeJS%20Build?logo=GitHub>)](https://github.com/com-pas/compas-open-scd/actions?query=workflow%3A%22NodeJS+Build%22)
4+
[![LFX Security Status](https://img.shields.io/badge/dynamic/json?color=orange&label=LFX%20Security%20Tool&query=issues%5B%3F%28%40%5B%27repository-name%27%5D%20%3D%3D%20%27compas-open-scd%27%29%5D%5B%27high-open-issues%27%5D&suffix=%20High%20open%20issues&url=https%3A%2F%2Fapi.security.lfx.linuxfoundation.org%2Fv1%2Fproject%2Fe8b6fdf9-2686-44c5-bbaa-6965d04ad3e1%2Fissues)](https://security.lfx.linuxfoundation.org/#/e8b6fdf9-2686-44c5-bbaa-6965d04ad3e1/issues)
5+
[![Slack](https://raw.githubusercontent.com/com-pas/compas-architecture/master/public/LFEnergy-slack.svg)](http://lfenergy.slack.com/)
66

77
Open Substation Communication Designer is an editor for SCL files as described in `IEC 61850-6`.
88

@@ -24,6 +24,25 @@ npm start
2424
- `lint` runs the linter
2525
- `doc` builds markdown documentation in the `doc` directory
2626

27+
### Docker
28+
It's also possible to run OpenSCD CoMPAS Edition as a docker. Of every release a docker image is created and pushed to Docker Hub.
29+
To run the docker container use the following command.
30+
31+
```
32+
docker run -it --rm -d -p 8080:80 --name compas-open-scd lfenergy/compas-open-scd:latest
33+
```
34+
Now open a browser and go to "http://localhost:8080". OpenSCD is shown.
35+
36+
### CoMPAS Service
37+
38+
During development, it is sometimes handy to use running backend services, like CIM Mapping or SCL Data Service.
39+
The problem is that these services need an Authorization Header to work. Normally these are injected by a reverse proxy
40+
or something like that.
41+
42+
There is a work-around and that is using the ModHeader Extension of the Browser (Chrome, Firefox, ...).
43+
With this extension the header 'Authorization' can be added with a value 'Bearer <access token>'.
44+
The AccessToken can be retrieved from a running KeyCloak instance.
45+
2746
## License
2847

2948
The [IEC 61850](https://webstore.iec.ch/publication/63319) XSD and NSD code components used are
@@ -33,4 +52,3 @@ This project is licensed under the [Apache License 2.0](LICENSE.md).
3352

3453
&copy; 2020-2021 OMICRON electronics GmbH
3554

36-
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fopenscd%2Fopen-scd.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fopenscd%2Fopen-scd?ref=badge_large)

0 commit comments

Comments
 (0)