-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJenkinsfile
More file actions
61 lines (51 loc) · 1.61 KB
/
Jenkinsfile
File metadata and controls
61 lines (51 loc) · 1.61 KB
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
#!groovy
@Library('waluigi@release/7') _
// NOTE: This Jenkinsfile relies on Tiny's internal infrastructure
standardProperties()
timestamps {
tinyPods.nodeBrowser(
tag: '20',
resourceRequestMemory: '3Gi',
resourceLimitMemory: '3Gi',
) {
stage("clean") {
exec('yarn clean')
}
stage("install") {
yarnInstall()
}
stage("build") {
exec('yarn build')
}
stage("test") {
exec('yarn test')
}
def platforms = [
[ browser: 'chrome', provider: 'lambdatest', os: 'macOS Sonoma', buckets: 1],
[ browser: 'edge', provider: 'lambdatest', buckets: 1],
[ browser: 'chrome', provider: 'aws', buckets: 2 ],
[ browser: 'firefox', provider: 'aws', buckets: 2 ],
[ browser: 'chrome', provider: 'headless' ]
]
def cleanBranchName = (env.BRANCH_NAME ?: "").split('/').last()
def testPrefix = "Bedrock_${cleanBranchName}-b${env.BUILD_NUMBER}"
bedrockLocalBrowsers(
testDirs: [ 'modules/sample/src/test/ts/**/pass' ],
custom: "--config modules/sample/tsconfig.json --customRoutes modules/sample/routes.json",
platforms: platforms,
prefix: testPrefix
)
stage("publish") {
if (isReleaseBranch()) {
echo "Publish?"
tinyNpm.withNpmPublishCredentials {
// We need to tell git to ignore the changes to .npmrc when publishing
exec('git update-index --assume-unchanged .npmrc')
exec('yarn lerna publish from-package --yes --no-git-reset --ignore @ephox/bedrock-sample')
}
} else {
echo "No release branch: nothing to publish"
}
}
}
}