/
Jenkinsfile
38 lines (34 loc) · 1.05 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
#!groovy
node('AspComponent') {
try {
deleteDir();
stage('Import') {
git url: 'http://github.com/essential-studio/ej2-groovy-scripts.git', branch: 'master', credentialsId: env.GithubCredentialID;
blazor = load 'src/blazor.groovy';
}
stage('Checkout') {
checkout scm;
blazor.getProjectDetails();
blazor.githubCommitStatus('running');
}
if(blazor.checkCommitMessage()) {
stage('Install') {
blazor.showcaseInstall();
}
stage('Build') {
blazor.runShell('gulp blazor-showcase-build --option ' + blazor.fetchTargetBranch());
}
stage('Publish') {
if(blazor.isProtectedBranch()) {
blazor.runShell('gulp blazor-showcase-azure-publish');
}
}
}
blazor.githubCommitStatus('success');
deleteDir();
}
catch(Exception e) {
blazor.throwError(e);
deleteDir();
}
}