blob: 3ad77fd1e3abe66357833d382d726931b75944b6 [file] [log] [blame]
gioa40058c2024-04-12 10:20:49 +04001pipeline {
2 agent {
3 kubernetes {
4 yaml '''
5 apiVersion: v1
6 kind: Pod
7 spec:
8 containers:
9 - name: golang
10 image: golang:1.22.2-alpine3.19
11 tty: true
giod0026612025-05-08 13:00:36 +000012 - name: node
13 image: node:24.0.0-alpine3.20
14 tty: true
gioa40058c2024-04-12 10:20:49 +040015 '''
16 }
17 }
18 stages {
gioc76baed2024-08-19 22:04:57 +040019 stage('build/test') {
gioa40058c2024-04-12 10:20:49 +040020 steps {
giod0026612025-05-08 13:00:36 +000021 container('node') {
22 sh "apk update"
23 sh "apk add gcc g++ make musl-dev python3 py3-setuptools"
gioc31bf142025-06-16 07:48:20 +000024 dir('apps/canvas/config') {
25 sh 'npm install'
26 sh 'npm run format-check'
27 sh 'npm run lint'
gio9b7421a2025-06-18 12:31:13 +000028 sh 'npm run test'
gioc31bf142025-06-16 07:48:20 +000029 }
giod0026612025-05-08 13:00:36 +000030 dir('apps/canvas/back') {
31 sh 'npm install'
32 sh 'npm run format-check'
gio8d0f6352025-05-11 13:29:33 +000033 sh 'npm run lint'
gio9b7421a2025-06-18 12:31:13 +000034 sh 'npm run test'
giod0026612025-05-08 13:00:36 +000035 }
36 dir('apps/canvas/front') {
37 sh 'npm install'
38 sh 'npm run format-check'
gio8d0f6352025-05-11 13:29:33 +000039 sh 'npm run lint'
giod0026612025-05-08 13:00:36 +000040 }
41 }
gioa40058c2024-04-12 10:20:49 +040042 container('golang') {
43 dir('core/installer') {
44 sh 'go mod tidy'
45 sh 'go build cmd/*.go'
gioa1f29472025-05-14 13:05:05 +040046 sh 'go run cuelang.org/go/cmd/cue fmt app_configs/*.cue --check'
gioa40058c2024-04-12 10:20:49 +040047 sh 'go test ./...'
48 }
gioaa6e27a2025-06-29 23:17:54 +040049 dir('apps/app-runner') {
50 sh 'go mod tidy'
51 sh 'go build *.go'
52 sh 'go test ./...'
53 }
Davit Tabidze75d57c32024-07-19 19:17:55 +040054 dir('core/auth/memberships') {
55 sh 'go mod tidy'
56 sh 'go build *.go'
57 sh 'go test ./...'
58 }
gioc76baed2024-08-19 22:04:57 +040059 dir('core/port-allocator') {
60 sh 'go mod tidy'
61 sh 'go build *.go'
62 sh 'go test ./...'
63 }
gioa40058c2024-04-12 10:20:49 +040064 }
65 }
66 }
67 }
68 post {
69 success {
70 gerritReview labels: [Verified: 1], message: env.BUILD_URL
71 }
72 unstable {
73 gerritReview labels: [Verified: 0], message: env.BUILD_URL
74 }
75 failure {
76 gerritReview labels: [Verified: -1], message: env.BUILD_URL
77 }
78 }
79}