Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 16-trains-with-no-changing-on-file-system
  • 18-predefined-selectable-option-as-an-environment-variable-value
  • 19-error-failed-to-parse-json-when-result-to-big
  • 19-error-failed-to-parse-json-when-result-to-big-2
  • 20-handling-the-telegraf-metrics-on-the-station-software-not-in-the-metadata-generator
  • 25-retrieving-the-station-pid-from-the-initial-env-file-and-setting-it-automatically-at-the
  • 39-add-anonymisation-feature-to-station-software
  • 40-allow-different-base-url-for-web-view
  • 41-update-packages
  • 43-streamlining-deployment
  • 48-adding-gpu-support-installation-to-the-install-script
  • 52-autofill-bind-mount
  • 8-vault-health-status
  • 88-poll-logs-only-if-running
  • 9-error-stdout-maxbuffer-length-exceeded
  • 93-vault-initialization-unsealing-error-in-station-software
  • api-for-keycloak-migration
  • cleaned-publishable-branch
  • cosign-integration
  • decouple-station-builds
  • edc-integration
  • enable-gzip-for-fl-results
  • error-tar-bad-archive
  • federated
  • federatedmerge
  • federatedmerge-backup
  • git-ci-test
  • interopt
  • job-automation-agent
  • keycloak-auth
  • main
  • main-fairds
  • prerelease
  • prerelease-semver
  • protect-routes-with-keycloak
  • redacted
  • renovate-axios-1.x-lockfile
  • renovate-diff2html-3.x-lockfile
  • renovate-eslint-8.x-lockfile
  • renovate-express-fileupload-1.x-lockfile
  • renovate-material-ui-popup-state-5.x-lockfile
  • renovate-mongo-4.x
  • renovate-mongoose-6.x-lockfile
  • renovate-nodemon-3.x-lockfile
  • renovate-reduxjs-toolkit-1.x-lockfile
  • renovate-semantic-release-monorepo
  • renovate/configure
  • replace-hardcoded-cs-path
  • set-sast-config-1
  • station-software-ui-update
  • v
  • v0.0.0
  • v1.0.0
  • v1.0.1
  • v1.0.5
  • v2.0.0
  • v2.0.1
  • v2.0.2
  • v2.0.3
  • v2.0.4
60 results

Target

Select target project
  • padme-development/padme-station-software
1 result
Select Git revision
Show changes
Commits on Source (14)
stages:
- build
- test
- deploy
- build 📦
# - test
- fetch-version 🔎
- deploy 🚅
- release 🚀
.common_release_config:
image: node:18
variables:
HUSKY: 0
before_script:
- npm install
variables:
REGISTRY_STATION_SOFTWARE_IMAGE: $CI_REGISTRY_IMAGE/station-software
......@@ -12,21 +21,22 @@ build_station_software:
image: docker:23-dind
services:
- docker:23-dind
stage: build
stage: build 📦
before_script:
- apk update && apk add git
- echo "$CI_BUILD_TOKEN" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script:
- echo "Build stationsoftware image!"
- docker build --pull -t $REGISTRY_STATION_SOFTWARE_IMAGE:$CI_COMMIT_SHA .
- echo "Building Station Software 🚧"
- docker build --pull -t $REGISTRY_STATION_SOFTWARE_IMAGE:$CI_COMMIT_SHA -t $REGISTRY_STATION_SOFTWARE_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $REGISTRY_STATION_SOFTWARE_IMAGE:$CI_COMMIT_SHA
- echo "build complete!"
- docker push $REGISTRY_STATION_SOFTWARE_IMAGE:$CI_COMMIT_REF_NAME
- echo "Station Software Build Complete! ✅"
build_dind:
image: docker:23-dind
services:
- docker:23-dind
stage: build
stage: build 📦
before_script:
- apk update && apk add git
- echo "$CI_BUILD_TOKEN" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
......@@ -40,7 +50,7 @@ build_vault:
image: docker:23-dind
services:
- docker:23-dind
stage: build
stage: build 📦
before_script:
- apk update && apk add git
- echo "$CI_BUILD_TOKEN" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
......@@ -50,27 +60,43 @@ build_vault:
- docker push $REGISTRY_VAULT_IMAGE:$CI_COMMIT_SHA
- echo "build complete!"
test_station_software:
image: node:16.2.0
stage: test
needs:
- build_station_software
### COMMENTING FOR NOW
### TEST COVERAGE CAN BE PRIORITIZED LATER
# test_station_software:
# image: node:16.2.0
# stage: test
# needs:
# - build_station_software
# script:
# - echo "Test station software!"
# - ls
# - npm install
# - npx jest --ci --reporters=default --reporters=jest-junit
# artifacts:
# when: always
# reports:
# junit:
# - junit.xml
fetch_semantic_version:
extends: .common_release_config
stage: fetch-version 🔎
script:
- echo "Test station software!"
- ls
- npm install
- npx jest --ci --reporters=default --reporters=jest-junit
- echo "Fetching Station Software release version 🚧"
- npx semantic-release --dry-run
- echo "Release Version added to Artifacts ✅"
artifacts:
when: always
reports:
junit:
- junit.xml
dotenv: variables.env
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "prerelease"
deploy_image_branch:
image: docker:23-dind
services:
- docker:23-dind
stage: deploy
stage: deploy 🚅
variables:
CI_HARBOR_REGISTRY: repository.padme-analytics.de/stationsoftware
HARBOR_STATION_SOFTWARE_IMAGE: $CI_HARBOR_REGISTRY/station-software
......@@ -80,39 +106,52 @@ deploy_image_branch:
- apk update && apk add git
- echo $HARBOR_REGISTRY_PASSWORD | docker login -u $HARBOR_REGISTRY_USER --password-stdin $HARBOR_REGISTRY
script:
- echo "Deploying Station Software image to Harbor with version v$RELEASE_VERSION 🚅"
- docker tag $REGISTRY_STATION_SOFTWARE_IMAGE:$CI_COMMIT_SHA $HARBOR_STATION_SOFTWARE_IMAGE:$CI_COMMIT_BRANCH
- docker tag $REGISTRY_STATION_SOFTWARE_IMAGE:$CI_COMMIT_SHA $HARBOR_STATION_SOFTWARE_IMAGE:$RELEASE_VERSION
- docker push $HARBOR_STATION_SOFTWARE_IMAGE:$CI_COMMIT_BRANCH
- docker push $HARBOR_STATION_SOFTWARE_IMAGE:$RELEASE_VERSION
- docker tag $REGISTRY_DIND_IMAGE:$CI_COMMIT_SHA $HARBOR_DIND_IMAGE:$CI_COMMIT_BRANCH
- docker push $HARBOR_DIND_IMAGE:$CI_COMMIT_BRANCH
- docker tag $REGISTRY_VAULT_IMAGE:$CI_COMMIT_SHA $HARBOR_VAULT_IMAGE:$CI_COMMIT_BRANCH
- docker push $HARBOR_VAULT_IMAGE:$CI_COMMIT_BRANCH
only:
- main
- prerelease
pages:
image: ubuntu:latest
stage: deploy
rules:
- if: "$CI_COMMIT_BRANCH==$CI_DEFAULT_BRANCH"
- if: '$CI_COMMIT_BRANCH== "prerelease"'
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "prerelease"
release:
extends: .common_release_config
stage: release 🚀
script:
- cp Installscript/padmetools.sh public/
artifacts:
paths:
- public
- npx semantic-release
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "prerelease"
include:
- template: Code-Quality.gitlab-ci.yml
code_quality:
artifacts:
expose_as: "Code Quality Report"
paths: [gl-code-quality-report.json]
expire_in: 365 days
rules:
- if: "$CODE_QUALITY_DISABLED"
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "prerelease"'
# pages:
# image: ubuntu:latest
# stage: deploy
# rules:
# - if: "$CI_COMMIT_BRANCH==$CI_DEFAULT_BRANCH"
# - if: '$CI_COMMIT_BRANCH== "prerelease"'
# script:
# - cp Installscript/padmetools.sh public/
# artifacts:
# paths:
# - public
# include:
# - template: Code-Quality.gitlab-ci.yml
# code_quality:
# artifacts:
# expose_as: "Code Quality Report"
# paths: [gl-code-quality-report.json]
# expire_in: 365 days
# rules:
# - if: "$CODE_QUALITY_DISABLED"
# when: never
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
# - if: '$CI_COMMIT_BRANCH == "main"'
# - if: '$CI_COMMIT_BRANCH == "prerelease"'
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx --no -- commitlint --edit "$1"
......@@ -3,11 +3,16 @@ FROM node:latest as node_cache
# Create app directory
WORKDIR /usr/src/app
ENV NODE_ENV=production
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# Disable husky in CI/Docker/Prod
# Install only production dependencies in the Docker image to reduce size
RUN npm pkg delete scripts.prepare && npm ci --omit=dev
#Install dependencies for wizard UI
COPY wizard-frontend/package*.json ./wizard-frontend/
......
FROM node:latest as node_cache
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
#Install dependencies for wizard UI
COPY wizard-frontend/package*.json ./wizard-frontend/
RUN npm --prefix wizard-frontend install
#Install dependencies for main UI
COPY station-frontend/package*.json ./station-frontend/
RUN npm --prefix station-frontend install
FROM gcr.io/projectsigstore/cosign:v2.2.1 as cosign-bin
FROM node:latest
WORKDIR /usr/src/app
COPY --from=node_cache /usr/src/app/ .
# Bundle app source
COPY . .
RUN mkdir /lockfiledir
# Copy cosign binary
COPY --from=cosign-bin /ko-app/cosign /usr/local/bin/cosign
EXPOSE 3030
CMD [ "npm", "run", "dev" ]
......@@ -51,4 +51,8 @@ To hold the tests for one javascript file a.js, create a corrosponding test file
### Static code analysis
For ensuring code quality and to prevent bugs, we use eslint for static code analysis. You can run the linter with `npx run eslint .`.
Ensure that the linter does not produce any critical error and as few warnings as possible. You can use the linter to fix some errors by adding a `--fix` flag.
\ No newline at end of file
Ensure that the linter does not produce any critical error and as few warnings as possible. You can use the linter to fix some errors by adding a `--fix` flag.
### Major Release Commit
### Minor Release Commit
\ No newline at end of file
......@@ -55,7 +55,9 @@ services:
restart: unless-stopped
pht-web:
build: ../
build:
context: ../
dockerfile: Dockerfile.dev
container_name: '${PROJECTNAME}pht-web'
command: ${COMMAND-/bin/sh -c "while sleep 1000; do :; done"}
ports:
......
......@@ -19,7 +19,7 @@ function randomString(size = 21) {
var app = express();
if (process.env.NODE_ENV) {
if (process.env.NODE_ENV === "development") {
app.use(
cors({
origin: ["http://localhost:3001", "http://127.0.0.1:3001"],
......
module.exports = {
extends: ["@commitlint/config-conventional"],
};
......@@ -12,7 +12,7 @@ const app = express();
* Port can be replaced with whatever port react
* app is running on.
*/
if (process.env.NODE_ENV) {
if (process.env.NODE_ENV === "development") {
app.use(
cors({
origin: ["http://localhost:3001", "http://127.0.0.1:3001"],
......
This diff is collapsed.
{
"name": "pht-web",
"version": "0.0.0",
"name": "@padme-development/padme-station-software",
"version": "2.0.0",
"description": "A Dockerized Javascript Web Application providing interfaces for Monitoring of the algorithms and components, which manage the business logic e.g. pulling a train, execute a train, inspect the results, and many more.",
"license": "MIT",
"homepage": "https://git.rwth-aachen.de/padme-development/padme-station-software",
"private": true,
"scripts": {
"cm": "cz",
"build:wizard": "npm run build --prefix wizard-frontend",
"build:station": "npm run build --prefix station-frontend",
"start": "npm run build:wizard && npm run build:station && node ./bin/www",
"dev": "NODE_ENV=development nodemon ./bin/www",
"test": "jest"
"test": "jest",
"semantic-release": "semantic-release"
},
"dependencies": {
"async-mutex": "^0.4.0",
......@@ -35,12 +40,60 @@
"wait-queue": "^1.1.4"
},
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^12.1.1",
"commitizen": "^4.3.0",
"cors": "^2.8.5",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.48.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.28.1",
"jest": "^29.6.4",
"jest-junit": "^16.0.0",
"nodemon": "^3.0.1"
"nodemon": "^3.0.1",
"semantic-release": "^22.0.8"
},
"publishConfig": {
"access": "public"
},
"release": {
"branches": [
"main",
"prerelease"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/gitlab",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo \"RELEASE_VERSION=${nextRelease.version}\" > variables.env"
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}