blob: ff51d94ca777d059a0c3bb369ca596de56cbba26 [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"
24 dir('apps/canvas/back') {
25 sh 'npm install'
26 sh 'npm run format-check'
gio8d0f6352025-05-11 13:29:33 +000027 sh 'npm run lint'
giod0026612025-05-08 13:00:36 +000028 }
29 dir('apps/canvas/front') {
30 sh 'npm install'
31 sh 'npm run format-check'
gio8d0f6352025-05-11 13:29:33 +000032 sh 'npm run lint'
giod0026612025-05-08 13:00:36 +000033 }
34 }
gioa40058c2024-04-12 10:20:49 +040035 container('golang') {
36 dir('core/installer') {
37 sh 'go mod tidy'
38 sh 'go build cmd/*.go'
gioa1f29472025-05-14 13:05:05 +040039 sh 'go run cuelang.org/go/cmd/cue fmt app_configs/*.cue --check'
gioa40058c2024-04-12 10:20:49 +040040 sh 'go test ./...'
41 }
Davit Tabidze75d57c32024-07-19 19:17:55 +040042 dir('core/auth/memberships') {
43 sh 'go mod tidy'
44 sh 'go build *.go'
45 sh 'go test ./...'
46 }
gioc76baed2024-08-19 22:04:57 +040047 dir('core/port-allocator') {
48 sh 'go mod tidy'
49 sh 'go build *.go'
50 sh 'go test ./...'
51 }
gioa40058c2024-04-12 10:20:49 +040052 }
53 }
54 }
55 }
56 post {
57 success {
58 gerritReview labels: [Verified: 1], message: env.BUILD_URL
59 }
60 unstable {
61 gerritReview labels: [Verified: 0], message: env.BUILD_URL
62 }
63 failure {
64 gerritReview labels: [Verified: -1], message: env.BUILD_URL
65 }
66 }
67}