Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 5ce7796

Browse files
cisco66666yanbin7
authored andcommitted
Update ubuntu's Jenkins file on JS to create a new podTemplate (#198)
* Update ubuntu's Jenkins file on JS to create a new podTemplate and not conflict with centos's podTemplate * fix timeout
1 parent 69423f5 commit 5ce7796

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

test/conference.jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pipeline {
3131
}
3232
}
3333
stage('Build package') {
34-
options { timeout(time: 10, unit: 'MINUTES') }
34+
options { timeout(time: 20, unit: 'MINUTES') }
3535
steps {
3636
podTemplate(name: 'pack', label: 'pack-mcu', containers: [
3737
containerTemplate(name: 'pack-on-centos', image: "$env.JS_MCU_BUILD", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '1000m', resourceLimitCpu: '1500m', resourceLimitMemory: '1.5Gi', resourceRequestMemory: '1.0Gi', network: 'host', command: 'cat')
@@ -46,7 +46,7 @@ pipeline {
4646
}
4747

4848
stage('Start test') {
49-
options { timeout(time: 60, unit: 'MINUTES') }
49+
options { timeout(time: 40, unit: 'MINUTES') }
5050
parallel {
5151
stage('API test') {
5252
steps {

test/ubuntuconference.jenkinsfile

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ pipeline {
1919
stages {
2020
stage('Unit test') {
2121
steps {
22-
podTemplate(name: 'unit-test', label: 'unit-test', cloud: 'kubernetes', containers: [
23-
containerTemplate(name: 'unit-test', image: "$env.JSMCU_TEST_IMAGE_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '500m', resourceLimitCpu: '1000m', resourceLimitMemory: '1.0Gi', resourceRequestMemory: '0.5Gi', network: 'host', command: 'cat')
22+
podTemplate(name: 'unit-test-ubuntu', label: 'unit-test-ubuntu', cloud: 'kubernetes', containers: [
23+
containerTemplate(name: 'unit-test-ubuntu', image: "$env.JSMCU_TEST_IMAGE_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '500m', resourceLimitCpu: '1000m', resourceLimitMemory: '1.0Gi', resourceRequestMemory: '0.5Gi', network: 'host', command: 'cat')
2424
]) {
25-
node('unit-test') {
26-
container('unit-test') {
25+
node('unit-test-ubuntu') {
26+
container('unit-test-ubuntu') {
2727
sh "cd /root/owt-client-javascript/test/unit/karma-test/ && ./start.sh"
2828
}
2929
}
@@ -33,11 +33,11 @@ pipeline {
3333
stage('Build package') {
3434
options { timeout(time: 20, unit: 'MINUTES') }
3535
steps {
36-
podTemplate(name: 'pack', label: 'pack-mcu', containers: [
37-
containerTemplate(name: 'pack-on-centos', image: "$env.JS_MCU_BUILD_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '1000m', resourceLimitCpu: '1500m', resourceLimitMemory: '1.5Gi', resourceRequestMemory: '1.0Gi', network: 'host', command: 'cat')
36+
podTemplate(name: 'pack-ubuntu', label: 'pack-mcu-ubuntu', containers: [
37+
containerTemplate(name: 'pack-on-ubuntu', image: "$env.JS_MCU_BUILD_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '1000m', resourceLimitCpu: '1500m', resourceLimitMemory: '1.5Gi', resourceRequestMemory: '1.0Gi', network: 'host', command: 'cat')
3838
]){
39-
node('pack-mcu') {
40-
container('pack-on-centos') {
39+
node('pack-mcu-ubuntu') {
40+
container('pack-on-ubuntu') {
4141
sh "/root/packSDKInDocker.sh $env.GIT_COMMIT $env.GIT_BRANCH $env.CHANGE_ID"
4242
}
4343
}
@@ -46,16 +46,16 @@ pipeline {
4646
}
4747

4848
stage('Start test') {
49-
options { timeout(time: 100, unit: 'MINUTES') }
49+
options { timeout(time: 40, unit: 'MINUTES') }
5050
parallel {
5151
stage('API test') {
5252
steps {
53-
podTemplate(name: 'api-test', label: 'api-test', cloud: 'kubernetes', containers: [
54-
containerTemplate(name: 'api-test', image: "$env.JSMCU_TEST_IMAGE_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '8000m', resourceLimitCpu: '9000m', resourceLimitMemory: '10.0Gi', resourceRequestMemory: '9.0Gi', network: 'host', command: 'cat'),
53+
podTemplate(name: 'api-test-ubuntu', label: 'api-test-ubuntu', cloud: 'kubernetes', containers: [
54+
containerTemplate(name: 'api-test-ubuntu', image: "$env.JSMCU_TEST_IMAGE_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '8000m', resourceLimitCpu: '9000m', resourceLimitMemory: '10.0Gi', resourceRequestMemory: '9.0Gi', network: 'host', command: 'cat'),
5555
]) {
5656

57-
node('api-test') {
58-
container('api-test') {
57+
node('api-test-ubuntu') {
58+
container('api-test-ubuntu') {
5959
sh "/root/start.sh ${env.GIT_COMMIT}1 ConferenceClient_api"
6060
}
6161
}
@@ -65,12 +65,12 @@ pipeline {
6565

6666
stage('Subscribe test') {
6767
steps {
68-
podTemplate(name: 'subscribe-test', label: 'subscribe-test', cloud: 'kubernetes', containers: [
69-
containerTemplate(name: 'subscribe-test', image: "$env.JSMCU_TEST_IMAGE_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '8000m', resourceLimitCpu: '9000m', resourceLimitMemory: '10.0Gi', resourceRequestMemory: '9.0Gi', network: 'host', command: 'cat'),
68+
podTemplate(name: 'subscribe-test-ubuntu', label: 'subscribe-test-ubuntu', cloud: 'kubernetes', containers: [
69+
containerTemplate(name: 'subscribe-test-ubuntu', image: "$env.JSMCU_TEST_IMAGE_UBUNTU", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '8000m', resourceLimitCpu: '9000m', resourceLimitMemory: '10.0Gi', resourceRequestMemory: '9.0Gi', network: 'host', command: 'cat'),
7070
]) {
7171

72-
node('subscribe-test') {
73-
container('subscribe-test') {
72+
node('subscribe-test-ubuntu') {
73+
container('subscribe-test-ubuntu') {
7474
sh "/root/start.sh ${env.GIT_COMMIT}2 ConferenceClient_subscribe"
7575
}
7676
}
@@ -90,3 +90,4 @@ pipeline {
9090
}
9191
}
9292
}
93+

0 commit comments

Comments
 (0)