-
Notifications
You must be signed in to change notification settings - Fork 8
/
Jenkinsfile
51 lines (50 loc) · 996 Bytes
/
Jenkinsfile
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
@Library('whiteblock-dev')_
pipeline {
agent {
kubernetes {
cloud 'kubernetes-dev-gke'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
cicd: true
spec:
containers:
- name: node
image: node
command:
- cat
tty: true
"""
}
}
environment {
DEFAULT_BRANCH = 'master'
}
stages {
stage('lint') {
steps {
container('node') {
script {
sh "curl -sSf https://assets.whiteblock.io/cli/install.sh | sh"
def files = findFiles(glob: '**/*.yaml').findAll { !it.path.contains('tutorials/') }
files.each {
echo "${it.path}"
sh """#!/bin/bash
set -xeo pipefail
source /root/.whiteblock/env
genesis lint $it.path
"""
}
}
}
}
}
}
post {
always {
slackNotify(env.BRANCH_NAME == env.DEFAULT_BRANCH)
}
}
}