-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJenkinsfile
More file actions
65 lines (55 loc) · 1.86 KB
/
Jenkinsfile
File metadata and controls
65 lines (55 loc) · 1.86 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
62
63
64
65
#!groovy
@Library('waluigi@release/7') _
// NOTE: This Jenkinsfile relies on Tiny's internal infrastructure
standardProperties()
timestamps {
tinyPods.nodeBrowser(
tag: '20',
resourceRequestMemory: '4Gi',
resourceLimitMemory: '4Gi'
) {
stage("clean") {
exec('yarn clean')
}
stage("install") {
yarnInstall()
}
stage("build") {
exec('yarn build')
}
stage("test") {
exec('yarn test')
}
def platforms = [
[ browser: 'chrome', provider: 'aws', buckets: 2 ],
[ browser: 'firefox', provider: 'aws', buckets: 2 ],
[ browser: 'edge', provider: 'lambdatest' ],
[ browser: 'chrome', provider: 'lambdatest', os: 'macOS Sonoma' ],
[ browser: 'firefox', provider: 'lambdatest', os: 'macOS Sonoma' ],
[ browser: 'safari', provider: 'lambdatest', os: 'macOS Sonoma' ],
[ 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
)
if (isReleaseBranch()) {
stage("publish") {
tinyPods.node() {
yarnInstall()
sh 'yarn build'
tinyNpm.withNpmPublishCredentials {
// We need to tell git to ignore the changes to .npmrc when publishing
exec('git update-index --assume-unchanged .npmrc')
// Re-evaluate whether we still need the `--no-verify-access` flag after upgrading Lerna (TINY-13539)
exec('yarn lerna publish from-package --yes --no-git-reset --ignore @ephox/bedrock-sample --no-verify-access')
}
}
}
}
}
}