Skip to content

Commit

Permalink
Merge pull request #9 from catenax-ng/main
Browse files Browse the repository at this point in the history
feat!: Merge upstream v1.0.0
  • Loading branch information
evegufy authored Feb 23, 2023
2 parents 62cf788 + ad83ade commit e247532
Show file tree
Hide file tree
Showing 107 changed files with 2,936 additions and 3,271 deletions.
31 changes: 31 additions & 0 deletions .conf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

FROM nginxinc/nginx-unprivileged:alpine
COPY .conf/nginx.conf /etc/nginx/conf.d/default.conf
COPY ./build /usr/share/nginx/html
# Change to root user for renaming of index.html to index.html.reference, to be used by env variables inject script
USER root
RUN mv /usr/share/nginx/html/index.html /usr/share/nginx/html/index.html.reference
# Add env variables inject script and mark as executable
COPY ./scripts/inject-dynamic-env.sh /docker-entrypoint.d/00-inject-dynamic-env.sh
RUN chmod +x /docker-entrypoint.d/00-inject-dynamic-env.sh
# Install bash for env variables inject script
RUN apk update && apk add --no-cache bash
# temp fix for CVE-2023-0286
RUN apk upgrade --no-cache libssl3 libcrypto3
# Make nginx owner of /usr/share/nginx/html/ and change to nginx user
RUN chown -R 101:101 /usr/share/nginx/html/
USER 101
19 changes: 19 additions & 0 deletions .conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

server {

listen 8080;
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************************
* Copyright (c) 2021,2022 Microsoft and BMW Group AG
* Copyright (c) 2021,2022 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2023 Microsoft and BMW Group AG
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

name: build

on:
Expand Down Expand Up @@ -80,8 +98,8 @@ jobs:
run: |
curl -v \
--request POST \
--url https://api.github.com/repos/catenax-ng/product-portal-cd/actions/workflows/portal-registration-image-update.yml/dispatches \
--url https://api.github.com/repos/catenax-ng/tx-portal-cd/actions/workflows/portal-registration-image-update.yml/dispatches \
--header "authorization: Bearer $TOKEN" \
--header "Accept: application/vnd.github.v3+json" \
--data '{"ref":"main", "inputs": { "new-image":"${{ github.ref_name }}_${{ env.COMMIT_SHA }}" }}' \
--data '{"ref":"helm-environments", "inputs": { "new-image":"${{ github.ref_name }}_${{ env.COMMIT_SHA }}" }}' \
--fail
42 changes: 42 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

name: pr checks

on: pull_request

jobs:
run-unit-tests:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Dependencies
run: yarn

# - name: linter checks
# run: yarn lint

- name: Unit Tests
run: yarn test:ci
13 changes: 7 additions & 6 deletions .github/workflows/kics.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

#
# SPDX-License-Identifier: Apache-2.0
---
###############################################################

name: "KICS"

Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

name: release

on:
Expand Down Expand Up @@ -107,8 +125,8 @@ jobs:
run: |
curl -v \
--request POST \
--url https://api.github.com/repos/catenax-ng/product-portal-cd/actions/workflows/portal-registration-int-release-image-update.yml/dispatches \
--url https://api.github.com/repos/catenax-ng/tx-portal-cd/actions/workflows/portal-registration-int-release-image-update.yml/dispatches \
--header "authorization: Bearer $TOKEN" \
--header "Accept: application/vnd.github.v3+json" \
--data '{"ref":"main", "inputs": { "new-image":"${{ env.RELEASE_VERSION }}" }}' \
--data '{"ref":"helm-environments", "inputs": { "new-image":"${{ env.RELEASE_VERSION }}" }}' \
--fail
15 changes: 8 additions & 7 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

#
# SPDX-License-Identifier: Apache-2.0
---
###############################################################

# Depending on the location of your Docker container
# you need to change the path to the specific Docker registry.
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
with:
sarif_file: "trivy-results1.sarif"

analyze-product-portal-frontend-registration:
analyze-portal-frontend-registration:
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/veracode.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Copyright (c) 2021-2022 Contributors to the Eclipse Foundation

###############################################################
# Copyright (c) 2021, 2023 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, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

#
# SPDX-License-Identifier: Apache-2.0
---
###############################################################

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Veracode
Expand Down
Loading

0 comments on commit e247532

Please sign in to comment.