-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile
49 lines (48 loc) · 1.49 KB
/
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
void setBuildStatus(String message, String state) {
step([
$class: "GitHubCommitStatusSetter",
reposSource: [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/aletheia-foundation/aletheia-app"],
contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/build-status"],
errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]],
statusResultSource: [ $class: "ConditionalStatusResultSource", results: [[$class: "AnyBuildResult", message: message, state: state]] ]
]);
}
pipeline {
agent any
tools { nodejs "node9.4" }
stages {
stage('Build') {
steps {
echo 'build step'
sh 'npm install'
}
}
stage('Test') {
steps {
echo 'test step'
sh 'npm run test:ci'
sh 'npm run test-truffle:ci'
}
}
stage('Generate app builds') {
steps {
echo 'Generate app builds step'
sh 'npm run electron:linux'
archiveArtifacts artifacts: 'app-builds/**', fingerprint: true
}
}
stage('Deploy contracts') {
steps {
echo 'deploy contracts step'
}
}
}
post {
success {
setBuildStatus("Build complete", "SUCCESS");
}
failure {
setBuildStatus("Build failed", "FAILURE");
}
}
}