-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipelight.ts
60 lines (53 loc) · 1.19 KB
/
pipelight.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import type { Config, Pipeline } from "./mod.ts";
import { Container, Docker, Network } from "./mod.ts";
import {
// nginx_unit,
parallel,
pipeline,
ssh,
step,
} from "./mod.ts";
const docker = new Docker({
globals: {
dns: "example.com",
version: "dev",
},
containers: [
{
suffix: "front",
image: {
suffix: "archlinux",
},
ports: [
{
in: 80,
out: 8281,
},
],
},
],
});
// Execute tests
const tests = pipeline("test", () => [
step("basic deno unit test suit", () => [
"deno test --allow-all",
]),
// test nginx-unit
// self-signed dummy ssl cert generation
// step("test nginx ssl", () => {
// const { expose } = nginx_unit();
// const container = docker.containers.get("front") as Container;
// return [...expose(container)];
// }),
]);
const npm: Pipeline = pipeline("npm_publish", () => [
step("generate npm package", () => ["deno run -A scripts/build_npm.ts"]),
]);
// Set triggers
tests.add_trigger!({
branches: ["dev", "master"],
actions: ["manual", "pre-push"],
});
const config = { pipelines: [tests, npm] };
export default config;
// config.pipelines?.push(tests);