Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .woodpecker/.feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
steps:
build-and-push:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: "${CI_REPO}"
tags: "feature-${CI_COMMIT_BRANCH##feature/}"
platforms: linux/amd64,linux/arm64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
- event: push
branch: [feature/*]
11 changes: 7 additions & 4 deletions .woodpecker/.latest.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
pipeline:
steps:
build:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: ${CI_REPO}
tags: latest
platforms: linux/amd64,linux/arm64
secrets: [ docker_username, docker_password ]
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
branch: master
event: push
- event: push
branch: master
11 changes: 7 additions & 4 deletions .woodpecker/.release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
pipeline:
steps:
build:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: ${CI_REPO}
tags: "${CI_COMMIT_TAG##v}"
platforms: linux/amd64,linux/arm64
secrets: [ docker_username, docker_password ]
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event: tag
tag: v*
- event: tag
tag: v*
5 changes: 2 additions & 3 deletions .woodpecker/.test-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pipeline:
steps:
lint:
image: node:20-alpine
commands:
Expand All @@ -11,5 +11,4 @@ pipeline:
repo: ${CI_REPO}
dry_run: true
when:
event:
- pull_request
- event: pull_request
2 changes: 2 additions & 0 deletions app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { querySudo as query } from "@lblod/mu-auth-sudo";
import { Request, Response } from "express";
import { createProxyMiddleware } from "http-proxy-middleware";
import { cleanEnv, EnvError, makeValidator, str, url } from "envalid";
import plugins from "./config/plugins";

const requiredRolesValidator = makeValidator((x) => {
try {
Expand Down Expand Up @@ -85,6 +86,7 @@ app.use(
}
});
},
...plugins,
],
}),
);
6 changes: 6 additions & 0 deletions config/plugins.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { Plugin } from "http-proxy-middleware";
import { Request, Response } from "express";

const plugins: Plugin<Request, Response>[] = [];

export default plugins;
63 changes: 33 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@lblod/mu-auth-sudo": "^0.6.1",
"body-parser": "^1.20.2",
"envalid": "^8.0.0",
"http-proxy-middleware": "^3.0.0"
"http-proxy-middleware": "^3.0.5"
},
"devDependencies": {
"@eslint/js": "^9.3.0",
Expand Down