develop #71

Closed
samuel-p wants to merge 179 commits from develop into master
6 changed files with 112 additions and 169 deletions

View file

@ -1,130 +0,0 @@
kind: pipeline
type: docker
name: linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: node:alpine
commands:
- npm install
- npm run build:ssr
- name: docker
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
repo: samuelph/universal-statuspage
username:
from_secret: USERNAME
password:
from_secret: PASSWORD
trigger:
branch:
- master
event:
- push
---
kind: pipeline
type: docker
name: linux-arm64
platform:
os: linux
arch: arm64
steps:
- name: build
image: node:alpine
commands:
- npm install
- npm run build:ssr
- name: docker
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
repo: samuelph/universal-statuspage
username:
from_secret: USERNAME
password:
from_secret: PASSWORD
when:
branch:
- master
event:
- push
---
kind: pipeline
type: docker
name: linux-arm
platform:
os: linux
arch: arm
steps:
- name: build
image: node:alpine
commands:
- npm install
- npm run build:ssr
- name: docker
image: plugins/docker
settings:
auto_tag: true
auto_tag_suffix: linux-arm
repo: samuelph/universal-statuspage
username:
from_secret: USERNAME
password:
from_secret: PASSWORD
trigger:
branch:
- master
event:
- push
---
kind: pipeline
type: docker
name: manifest
platform:
os: linux
arch: arm64
steps:
- name: publish
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
target: samuelph/universal-statuspage
template: samuelph/universal-statuspage:OS-ARCH
platforms:
- linux/amd64
- linux/arm64
- linux/arm
username:
from_secret: USERNAME
password:
from_secret: PASSWORD
depends_on:
- linux-amd64
- linux-arm64
- linux-arm
trigger:
branch:
- master
event:
- push

35
.woodpecker.yml Normal file
View file

@ -0,0 +1,35 @@
pipeline:
build:
image: node:lts-buster@sha256:86853bc87b53623ce8c40fcc0e9dcbdaed64fe7143e178db5735ef1902002d68
commands:
- npm install
- npm run build:ssr
docker:
image: woodpeckerci/plugin-docker-buildx
secrets:
- DOCKER_USERNAME
- DOCKER_PASSWORD
settings:
repo: samuelph/universal-statuspage
tags: latest
when:
branch:
- main
event:
- push
cr:
image: woodpeckerci/plugin-docker-buildx
secrets:
- source: CR_USERNAME
target: DOCKER_USERNAME
- source: CR_PASSWORD
target: DOCKER_PASSWORD
settings:
registry: cr.sp-codes.de
repo: cr.sp-codes.de/samuel-p/universal-statuspage
tags: latest
when:
branch:
- main
event:
- push

View file

@ -1,4 +1,6 @@
FROM node:14.15.4-alpine
FROM alpine:3.15.0@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300
RUN apk --no-cache add nodejs="14.20.0-r0"
COPY dist/universal-statuspage /universal-statuspage

View file

@ -15,56 +15,56 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~11.0.7",
"@angular/cdk": "^11.0.3",
"@angular/common": "~11.0.7",
"@angular/compiler": "~11.0.7",
"@angular/core": "~11.0.7",
"@angular/forms": "~11.0.7",
"@angular/material": "^11.0.3",
"@angular/platform-browser": "~11.0.7",
"@angular/platform-browser-dynamic": "~11.0.7",
"@angular/platform-server": "~11.0.7",
"@angular/router": "~11.0.7",
"@fortawesome/fontawesome-free": "^5.15.1",
"@nguniversal/express-engine": "^11.0.1",
"@angular/animations": "~11.1.0",
"@angular/cdk": "^11.1.0",
"@angular/common": "~11.1.0",
"@angular/compiler": "~11.1.0",
"@angular/core": "~11.1.0",
"@angular/forms": "~11.1.0",
"@angular/material": "^11.1.0",
"@angular/platform-browser": "~11.1.0",
"@angular/platform-browser-dynamic": "~11.1.0",
"@angular/platform-server": "~11.1.0",
"@angular/router": "~11.1.0",
"@fortawesome/fontawesome-free": "^5.15.4",
"@nguniversal/express-engine": "^12.1.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@types/node-cron": "^2.0.3",
"bootstrap": "^4.5.3",
"cron": "^1.8.2",
"dayjs": "^1.10.2",
"@types/node-cron": "^2.0.5",
"bootstrap": "^4.6.2",
"cron": "^2.3.1",
"dayjs": "^1.11.0",
"express": "^4.17.1",
"flag-icon-css": "^3.5.0",
"jsonpath-plus": "^4.0.0",
"node-cron": "^2.0.3",
"jsonpath-plus": "^6.0.1",
"node-cron": "^3.0.0",
"roboto-fontface": "^0.10.0",
"rxjs": "~6.6.3",
"tslib": "^2.0.0",
"tslib": "^2.1.0",
"tz-offset": "0.0.2",
"zone.js": "~0.10.2"
"zone.js": "~0.11.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.6",
"@angular/cli": "~11.0.6",
"@angular/compiler-cli": "~11.0.7",
"@angular/language-service": "~11.0.7",
"@nguniversal/builders": "^11.0.1",
"@types/express": "^4.17.9",
"@types/node": "^14.0.23",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^6.0.0",
"@angular-devkit/build-angular": "~0.1101.1",
"@angular/cli": "~11.1.1",
"@angular/compiler-cli": "~11.1.0",
"@angular/language-service": "~11.1.0",
"@nguniversal/builders": "^12.1.0",
"@types/express": "^4.17.12",
"@types/node": "^14.14.22",
"@types/jasmine": "~3.6.3",
"@types/jasminewd2": "~2.0.8",
"codelyzer": "^6.0.1",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.0",
"jasmine-spec-reporter": "~6.0.0",
"karma": "~6.0.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"protractor": "~7.0.0",
"ts-node": "~8.10.2",
"ts-node": "~9.1.1",
"tslint": "~6.1.0",
"typescript": "~4.0.5"
"typescript": "~4.1.3"
}
}

View file

@ -6,6 +6,20 @@
"develop"
],
"rangeStrategy": "bump",
"rebaseWhen": "behind-base-branch",
"regexManagers": [
{
"fileMatch": [
"^Dockerfile$"
],
"matchStrings": [
"\\s+(?<depName>[a-z0-9\\-]+?)=\"(?<currentValue>.*?)\""
],
"lookupNameTemplate": "alpine_3_14/{{{depName}}}",
"versioningTemplate": "loose",
"datasourceTemplate": "repology"
}
],
"packageRules": [
{
"managers": [
@ -30,6 +44,22 @@
"^jasmine"
],
"enabled": false
},
{
"datasources": [
"repology"
],
"groupName": [
"base dependencies"
]
},
{
"datasources": [
"docker"
],
"groupName": [
"docker images"
]
}
]
}

View file

@ -79,6 +79,12 @@ api.post('/update/health', (req, res) => {
return res.status(401).send('invalid token');
}
const serviceId = req.query.service as string;
if (!config.groups
.map(g => g.services).reduce((x, y) => x.concat(y), [])
.map(s => s.id).includes(serviceId)) {
// TODO remove old caches
return res.send('OK');
}
let services: { id: string, state: string }[] = [];
if (serviceId) {
services = [{id: serviceId, state: JSONPath({path: serviceStatePaths[serviceId], json: req.body, wrap: false})}];