forked from tinymce/tinymce-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
65 lines (52 loc) · 1.44 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!groovy
@Library('[email protected]') _
standardProperties()
node("primary") {
echo "Clean workspace"
cleanWs()
stage ("Checkout SCM") {
checkout localBranch(scm)
}
stage("Building") {
yarnInstall()
exec "yarn run build"
}
def permutations = [
[ name: "win10Chrome", os: "windows-10", browser: "chrome" ],
[ name: "win10FF", os: "windows-10", browser: "firefox" ],
[ name: "win10Edge", os: "windows-10", browser: "MicrosoftEdge" ],
[ name: "win10IE", os: "windows-10", browser: "ie" ]
]
def processes = [:]
for (int i = 0; i < permutations.size(); i++) {
def permutation = permutations.get(i);
def name = permutation.name;
processes[name] = {
node("bedrock-" + permutation.os) {
echo "Clean workspace"
cleanWs()
echo "Checkout"
checkout scm
echo "Installing tools"
yarnInstall()
echo "Platform: browser tests for " + permutation.name
bedrockTests(permutation.name, permutation.browser, "src/test/ts/browser")
}
}
}
stage("Parallel Browser Tests") {
parallel processes
}
if (isReleaseBranch() && isPackageNewerVersion()) {
stage("Deploying storybook to github") {
sshagent (credentials: ['dcd9940f-08e1-4b75-bf0c-63fff1913540']) {
sh 'yarn storybook-to-ghpages'
}
}
}
if (isReleaseBranch() && isPackageNewerVersion()) {
stage("Publish") {
sh 'npm publish'
}
}
}