Files
thilatrait/.drone.jsonnet
Julien Valverdé c6de7004d2
All checks were successful
continuous-integration/drone/push Build is passing
Project setup (#1)
Sets up project build and CI

Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Reviewed-on: https://git.jvalver.de/Thilawyn/thilatrait/pulls/1
2023-12-09 02:22:38 +01:00

94 lines
2.1 KiB
Jsonnet

local bun_image = "oven/bun:1";
local fetch_step = {
name: "fetch",
image: "alpine/git",
commands: ["git fetch --tags"],
};
local install_step = {
name: "install",
image: bun_image,
commands: ["bun install --frozen-lockfile"],
};
local lint_step = {
name: "lint",
image: bun_image,
commands: ["bun lint:tsc"],
};
local generate_docker_tags_step = {
name: "generate-docker-tags",
image: "git.jvalver.de/thilawyn/drone-better-docker-autotag",
};
[
// Lint the whole project when not in master, not in a PR nor on a tag
{
kind: "pipeline",
type: "docker",
name: "lint",
trigger: {
ref: {
exclude: [
"refs/heads/master",
"refs/pull/**",
"refs/tags/**",
]
}
},
steps: [
install_step,
lint_step,
],
},
// Build the server and legacy API docker images without publishing them for pull requests
// {
// kind: "pipeline",
// type: "docker",
// name: "build-docker",
// trigger: {
// ref: {
// include: ["refs/pull/**"]
// }
// },
// steps: [
// fetch_step,
// generate_docker_tags_step,
// build_website_docker_step(false),
// build_legacy_api_docker_step(false),
// ],
// },
// Build the server and legacy API docker images and publish them for master and tags
// {
// kind: "pipeline",
// type: "docker",
// name: "build-publish-docker",
// trigger: {
// ref: {
// include: [
// "refs/heads/master",
// "refs/tags/**",
// ]
// }
// },
// steps: [
// fetch_step,
// generate_docker_tags_step,
// build_website_docker_step(true),
// build_legacy_api_docker_step(true),
// ],
// },
]