-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjitsucom-jitsu.yaml
102 lines (89 loc) · 3.6 KB
/
jitsucom-jitsu.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package:
name: jitsucom-jitsu
version: 2.8.5
epoch: 2
description: Jitsu is an open-source Segment alternative. Fully-scriptable data ingestion engine for modern data teams. Set-up a real-time data pipeline in minutes, not days
copyright:
- license: MIT
target-architecture:
- x86_64
dependencies:
runtime:
- bash
- curl
- netcat-openbsd
- nodejs-18
- openssl
- procps
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- esbuild
- gcc-12
- gcc-12-default
- jq
- make
- node-gyp
- nodejs-18
- npm
- openssl
- pnpm
- py3-setuptools
- python3
pipeline:
- uses: git-checkout
with:
expected-commit: ffe8e8edbf8edf7cf9a727b406ba4f9d803ba0a5
repository: https://github.com/jitsucom/jitsu
tag: jitsu2-v${{package.version}}
- runs: |
pnpm install -r --unsafe-perm
export NEXTJS_STANDALONE_BUILD=1
# Without this, we run into a strange error:
# "Module not found: Error: Can't resolve './build' in '/home/build/node_modules/.pnpm/zstd-napi@0.0.6/node_modules/zstd-napi'"
(cd $(find node_modules -type d -name zstd-napi -print -quit) && npm run-script build)
pnpm build
subpackages:
- name: ${{package.name}}-console
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/app
mkdir -p ${{targets.contextdir}}/app/webapps
mkdir -p ${{targets.contextdir}}/app/webapps/console/public
mkdir -p ${{targets.contextdir}}/app/webapps/console/.next/static
npm -g install prisma@$(cat webapps/console/package.json | jq -r '.dependencies.prisma') -prefix ${{targets.contextdir}}/usr/local/
# Remove all callouts to "cron" since it is not being used here and causes breakage
# introduced in this commit: https://github.com/jitsucom/jitsu/commit/c9c781fa0f46414bc9fd63767c44e8010614dd5d#diff-ff5878f38438ed7c50e9ba556a4312ea11c93922c8eeb25f81dd102754d6221aR13
cat ./docker-start-console.sh | grep -v cron > ${{targets.contextdir}}/app/docker-start-console.sh
chmod +x ${{targets.contextdir}}/app/docker-start-console.sh
cp ./webapps/console/prisma/schema.prisma ${{targets.contextdir}}/app/
cp -r ./webapps/console/.next/standalone/* ${{targets.contextdir}}/app/
# remove esbuild which is build time dependency we don't need to ship it in the final package
rm -rf ${{targets.contextdir}}/app/node_modules/.pnpm/@esbuild+linux-x64@0.20.2
cp -r ./webapps/console/.next/static/* ${{targets.contextdir}}/app/webapps/console/.next/static
cp -r ./webapps/console/public/* ${{targets.contextdir}}/app/webapps/console/public
# remove musl deps that end up polluting our SCA-generated dependencies with unresolveable deps.
rm -rf \
${{targets.contextdir}}/app/node_modules/.pnpm/@img+sharp-libvips-linuxmusl-x64@1.0.4 \
${{targets.contextdir}}/app/node_modules/.pnpm/@img+sharp-linuxmusl-x64@0.33.5
dependencies:
runtime:
- ${{package.name}}
- name: ${{package.name}}-rotor
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/app
mkdir -p ${{targets.contextdir}}/usr/local/bin
cp -r ./services/rotor/dist/* ${{targets.contextdir}}/app/
cp docker-entrypoint.sh ${{targets.contextdir}}/usr/local/bin/docker-entrypoint.sh
dependencies:
runtime:
- ${{package.name}}
update:
enabled: true
github:
identifier: jitsucom/jitsu
strip-prefix: jitsu2-v