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

Commit 4341358

Browse files
authored
master mcu repo jenkinsfile fix (#483)
1 parent ce85760 commit 4341358

File tree

2 files changed

+34
-102
lines changed

2 files changed

+34
-102
lines changed

test/server.jenkinsfile

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@ pipeline {
1818
stage('Build package') {
1919
options { timeout(time:30,unit:'MINUTES') }
2020
steps {
21-
podTemplate(name: 'pack-server', label: 'pack-mcu-server',
21+
podTemplate(name: "pack-server-centos-"+env.GIT_BRANCH, label: "pack-server-centos-"+env.GIT_BRANCH,
2222
volumes: [
23-
persistentVolumeClaim(claimName: 'stability-package',mountPath: '/root/stabilityPackage',readOnly: false),
2423
persistentVolumeClaim(claimName: 'centos-package',mountPath: '/root/centos_package',readOnly: false),
2524
persistentVolumeClaim(claimName: 'webrtc79',mountPath: '/root/owt-server/third_party/webrtc-m79',readOnly: false)
2625
],
2726
containers: [
28-
containerTemplate(name: 'pack-on-centos-server', image: "$env.centos_build_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '5000m', resourceLimitCpu: '6000m', network: 'host', command: 'cat')
27+
containerTemplate(name: 'build-images', image: "$env.centos_build_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '5000m', resourceLimitCpu: '6000m', command: 'cat')
2928
]){
30-
node ('pack-mcu-server') {
31-
container ('pack-on-centos-server') {
32-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password centos build owt-server $env.GIT_BRANCH $env.GIT_COMMIT $env.CHANGE_ID"
29+
node ("pack-server-centos-"+env.GIT_BRANCH) {
30+
container ('build-images') {
31+
sh "/root/startRun.sh * * centos build owt-server $env.GIT_BRANCH $env.GIT_COMMIT $env.CHANGE_ID"
3332
}
3433
}
3534
}
@@ -46,22 +45,17 @@ pipeline {
4645
parallel {
4746
stage('ConferenceClient API 1') {
4847
steps {
49-
podTemplate(name: 'api-test-server', label: 'api-test-server', cloud: 'kubernetes',
48+
podTemplate(name: 'api-server-centos--'+env.GIT_BRANCH, label: 'api-server-centos-'+env.GIT_BRANCH, cloud: 'kubernetes',
5049
volumes: [
5150
persistentVolumeClaim(claimName: 'centos-package', mountPath: '/root/centos_package', readOnly: false),
52-
persistentVolumeClaim(claimName: 'audio-lib', mountPath: '/root/audio_lib',readOnly: false),
53-
persistentVolumeClaim(claimName: 'recording-lib', mountPath: '/root/recording_lib',readOnly: false),
54-
persistentVolumeClaim(claimName: 'sip-lib', mountPath: '/root/sip_lib',readOnly: false),
55-
persistentVolumeClaim(claimName: 'streaming-lib', mountPath: '/root/streaming_lib', readOnly: false),
56-
persistentVolumeClaim(claimName: 'video-lib', mountPath: '/root/video_lib',readOnly: false),
5751
persistentVolumeClaim(claimName: 'centos-log', mountPath: '/root/centos_log', readOnly: false)
5852
],
5953
containers: [
60-
containerTemplate(name: 'api-test-server', image: "$env.centos_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '2000m', resourceLimitCpu: '6000m',resourceLimitMemory: '9.0Gi', resourceRequestMemory: '8.0Gi', network: 'host', command: 'cat'),
54+
containerTemplate(name: 'test-images', image: "$env.centos_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true,resourceRequestCpu: '3000m', resourceLimitCpu: '4000m', resourceRequestMemory: '2.0Gi', resourceLimitMemory: '3.0Gi', command: 'cat'),
6155
]) {
62-
node('api-test-server') {
63-
container('api-test-server') {
64-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password centos test ${env.GIT_COMMIT} ConferenceClient_API_1"
56+
node('api-server-centos-'+env.GIT_BRANCH) {
57+
container('test-images') {
58+
sh "/root/startRun.sh * * centos test ${env.GIT_COMMIT} ConferenceClient_API_1"
6559
}
6660
}
6761
}
@@ -70,46 +64,17 @@ pipeline {
7064

7165
stage('ConferenceClient API 2') {
7266
steps {
73-
podTemplate(name:'subscribe-test-server', label: 'subscribe-test-server', cloud: 'kubernetes',
67+
podTemplate(name:'rest-server-centos-'+env.GIT_BRANCH, label: 'rest-server-centos-'+env.GIT_BRANCH, cloud: 'kubernetes',
7468
volumes: [
7569
persistentVolumeClaim(claimName: 'centos-package', mountPath: '/root/centos_package', readOnly: false),
76-
persistentVolumeClaim(claimName: 'audio-lib', mountPath: '/root/audio_lib',readOnly: false),
77-
persistentVolumeClaim(claimName: 'recording-lib', mountPath: '/root/recording_lib',readOnly: false),
78-
persistentVolumeClaim(claimName: 'sip-lib', mountPath: '/root/sip_lib',readOnly: false),
79-
persistentVolumeClaim(claimName: 'streaming-lib', mountPath: '/root/streaming_lib', readOnly: false),
80-
persistentVolumeClaim(claimName: 'video-lib', mountPath: '/root/video_lib',readOnly: false),
8170
persistentVolumeClaim(claimName: 'centos-log', mountPath: '/root/centos_log', readOnly: false)
8271
],
8372
containers: [
84-
containerTemplate(name: 'subscribe-test-server', image: "$env.centos_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '2000m', resourceLimitCpu: '6000m',resourceLimitMemory: '9.0Gi', resourceRequestMemory: '8.0Gi', network: 'host', command: 'cat'),
73+
containerTemplate(name: 'test-images', image: "$env.centos_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '3000m', resourceLimitCpu: '4000m', resourceRequestMemory: '2.0Gi', resourceLimitMemory: '3.0Gi', command: 'cat'),
8574
]) {
86-
node('subscribe-test-server') {
87-
container('subscribe-test-server') {
88-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password centos test ${env.GIT_COMMIT} ConferenceClient_API_2"
89-
}
90-
}
91-
}
92-
}
93-
}
94-
95-
stage('ConferenceClient API 3') {
96-
steps {
97-
podTemplate(name:'simucast-test-server', label: 'simucast-test-server', cloud: 'kubernetes',
98-
volumes: [
99-
persistentVolumeClaim(claimName: 'centos-package', mountPath: '/root/centos_package', readOnly: false),
100-
persistentVolumeClaim(claimName: 'audio-lib', mountPath: '/root/audio_lib',readOnly: false),
101-
persistentVolumeClaim(claimName: 'recording-lib', mountPath: '/root/recording_lib',readOnly: false),
102-
persistentVolumeClaim(claimName: 'sip-lib', mountPath: '/root/sip_lib',readOnly: false),
103-
persistentVolumeClaim(claimName: 'streaming-lib', mountPath: '/root/streaming_lib', readOnly: false),
104-
persistentVolumeClaim(claimName: 'video-lib', mountPath: '/root/video_lib',readOnly: false),
105-
persistentVolumeClaim(claimName: 'centos-log', mountPath: '/root/centos_log', readOnly: false)
106-
],
107-
containers: [
108-
containerTemplate(name: 'simucast-test-server', image: "$env.centos_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '2000m', resourceLimitCpu: '6000m',resourceLimitMemory: '9.0Gi', resourceRequestMemory: '8.0Gi', network: 'host', command: 'cat'),
109-
]) {
110-
node('simucast-test-server') {
111-
container('simucast-test-server') {
112-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password centos test ${env.GIT_COMMIT} ConferenceClient_API_3"
75+
node('rest-server-centos-'+env.GIT_BRANCH) {
76+
container('test-images') {
77+
sh "/root/startRun.sh * * centos test ${env.GIT_COMMIT} ConferenceClient_API_2"
11378
}
11479
}
11580
}

test/ubuntuserver.jenkinsfile

Lines changed: 19 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,19 @@ pipeline {
1616

1717
stages {
1818
stage('Build package') {
19-
options { timeout(time:20,unit:'MINUTES') }
19+
options { timeout(time:30,unit:'MINUTES') }
2020
steps {
21-
podTemplate(name: 'pack-server-ubuntu', label: 'pack-mcu-server-ubuntu',
21+
podTemplate(name: 'pack-server-ubuntu-'+env.GIT_BRANCH, label: 'pack-server-ubuntu-'+env.GIT_BRANCH,
2222
volumes: [
23-
persistentVolumeClaim(claimName: 'stability-package',mountPath: '/root/stabilityPackage',readOnly: false),
2423
persistentVolumeClaim(claimName: 'ubuntu-package',mountPath: '/root/ubuntu_package',readOnly: false),
25-
persistentVolumeClaim(claimName: 'webrtc79ubuntu',mountPath: '/root/owt-server/third_party/webrtc-m79',readOnly: false)
24+
persistentVolumeClaim(claimName: 'webrtc79ubuntu',mountPath: '/root/owt-server/third_party/webrtc-m79',readOnly: false)
2625
],
2726
containers: [
28-
containerTemplate(name: 'pack-on-ubuntu-server', image: "$env.ubuntu_build_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '5000m', resourceLimitCpu: '6000m', network: 'host', command: 'cat')
27+
containerTemplate(name: 'build-images', image: "$env.ubuntu_build_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '5000m', resourceLimitCpu: '6000m' , command: 'cat')
2928
]){
30-
node ('pack-mcu-server-ubuntu') {
31-
container ('pack-on-ubuntu-server') {
32-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password ubuntu build owt-server $env.GIT_BRANCH $env.GIT_COMMIT $env.CHANGE_ID"
29+
node ('pack-server-ubuntu-'+env.GIT_BRANCH) {
30+
container ('build-images') {
31+
sh "/root/startRun.sh * * ubuntu build owt-server $env.GIT_BRANCH $env.GIT_COMMIT $env.CHANGE_ID"
3332
}
3433
}
3534
}
@@ -46,22 +45,16 @@ pipeline {
4645
parallel {
4746
stage('ConferenceClient API 1') {
4847
steps {
49-
podTemplate(name: 'api-test-server-ubuntu', label: 'api-test-server-ubuntu', cloud: 'kubernetes',
48+
podTemplate(name: 'api-server-ubuntu-'+env.GIT_BRANCH, label: 'api-server-ubuntu-'+env.GIT_BRANCH, cloud: 'kubernetes',
5049
volumes: [
5150
persistentVolumeClaim(claimName: 'ubuntu-package',mountPath: '/root/ubuntu_package',readOnly: false),
52-
persistentVolumeClaim(claimName: 'ubuntu-audio-lib',mountPath: '/root/audio_lib',readOnly: false),
53-
persistentVolumeClaim(claimName: 'ubuntu-recording-lib',mountPath: '/root/recording_lib',readOnly: false),
54-
persistentVolumeClaim(claimName: 'ubuntu-sip-lib',mountPath: '/root/sip_lib',readOnly: false),
55-
persistentVolumeClaim(claimName: 'ubuntu-streaming-lib',mountPath: '/root/streaming_lib',readOnly: false),
56-
persistentVolumeClaim(claimName: 'ubuntu-video-lib',mountPath: '/root/video_lib',readOnly: false),
5751
persistentVolumeClaim(claimName: 'ubuntu-log',mountPath: '/root/ubuntu_log',readOnly: false)
5852
],
5953
containers: [
60-
containerTemplate(name: 'api-test-server-ubuntu', image: "$env.ubuntu_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '2000m', resourceLimitCpu: '6000m',resourceLimitMemory: '9.0Gi', resourceRequestMemory: '8.0Gi', network: 'host', command: 'cat'),
61-
]) {
62-
node('api-test-server-ubuntu') {
63-
container('api-test-server-ubuntu') {
64-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password ubuntu test ${env.GIT_COMMIT} ConferenceClient_API_1"
54+
containerTemplate(name: 'test-images', image: "$env.ubuntu_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '3000m', resourceLimitCpu: '4000m', resourceRequestMemory: '2.0Gi', resourceLimitMemory: '3.0Gi', command: 'cat'), ]) {
55+
node('api-server-ubuntu-'+env.GIT_BRANCH) {
56+
container('test-images') {
57+
sh "/root/startRun.sh * * ubuntu test ${env.GIT_COMMIT} ConferenceClient_API_1"
6558
}
6659
}
6760
}
@@ -70,51 +63,24 @@ pipeline {
7063

7164
stage('ConferenceClient API 2') {
7265
steps {
73-
podTemplate(name:'subscribe-test-server-ubuntu', label: 'subscribe-test-server-ubuntu', cloud: 'kubernetes',
66+
podTemplate(name:'rest-server-ubuntu-'+env.GIT_BRANCH, label: 'rest-server-ubuntu-'+env.GIT_BRANCH, cloud: 'kubernetes',
7467
volumes: [
7568
persistentVolumeClaim(claimName: 'ubuntu-package',mountPath: '/root/ubuntu_package',readOnly: false),
76-
persistentVolumeClaim(claimName: 'ubuntu-audio-lib',mountPath: '/root/audio_lib',readOnly: false),
77-
persistentVolumeClaim(claimName: 'ubuntu-recording-lib',mountPath: '/root/recording_lib',readOnly: false),
78-
persistentVolumeClaim(claimName: 'ubuntu-sip-lib',mountPath: '/root/sip_lib',readOnly: false),
79-
persistentVolumeClaim(claimName: 'ubuntu-streaming-lib',mountPath: '/root/streaming_lib',readOnly: false),
80-
persistentVolumeClaim(claimName: 'ubuntu-video-lib',mountPath: '/root/video_lib',readOnly: false),
8169
persistentVolumeClaim(claimName: 'ubuntu-log',mountPath: '/root/ubuntu_log',readOnly: false)
8270
],
8371
containers: [
84-
containerTemplate(name: 'subscribe-test-server-ubuntu', image: "$env.ubuntu_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '2000m', resourceLimitCpu: '6000m',resourceLimitMemory: '9.0Gi', resourceRequestMemory: '8.0Gi', network: 'host', command: 'cat'),
72+
containerTemplate(name: 'test-images', image: "$env.ubuntu_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true,resourceRequestCpu: '3000m', resourceLimitCpu: '4000m', resourceRequestMemory: '2.0Gi', resourceLimitMemory: '3.0Gi', command: 'cat'),
8573
]) {
86-
node('subscribe-test-server-ubuntu') {
87-
container('subscribe-test-server-ubuntu') {
88-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password ubuntu test ${env.GIT_COMMIT} ConferenceClient_API_2"
74+
node('rest-server-ubuntu-'+env.GIT_BRANCH) {
75+
container('test-images') {
76+
sh "/root/startRun.sh * * ubuntu test ${env.GIT_COMMIT} ConferenceClient_API_2"
8977
}
9078
}
9179
}
9280
}
9381
}
9482

95-
stage('ConferenceClient API 3') {
96-
steps {
97-
podTemplate(name:'simucast-test-server-ubuntu', label: 'simucast-test-server-ubuntu', cloud: 'kubernetes',
98-
volumes: [
99-
persistentVolumeClaim(claimName: 'ubuntu-package',mountPath: '/root/ubuntu_package',readOnly: false),
100-
persistentVolumeClaim(claimName: 'ubuntu-audio-lib',mountPath: '/root/audio_lib',readOnly: false),
101-
persistentVolumeClaim(claimName: 'ubuntu-recording-lib',mountPath: '/root/recording_lib',readOnly: false),
102-
persistentVolumeClaim(claimName: 'ubuntu-sip-lib',mountPath: '/root/sip_lib',readOnly: false),
103-
persistentVolumeClaim(claimName: 'ubuntu-streaming-lib',mountPath: '/root/streaming_lib',readOnly: false),
104-
persistentVolumeClaim(claimName: 'ubuntu-video-lib',mountPath: '/root/video_lib',readOnly: false),
105-
persistentVolumeClaim(claimName: 'ubuntu-log',mountPath: '/root/ubuntu_log',readOnly: false)
106-
],
107-
containers: [
108-
containerTemplate(name: 'simucast-test-server-ubuntu', image: "$env.ubuntu_test_images", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '2000m', resourceLimitCpu: '6000m',resourceLimitMemory: '9.0Gi', resourceRequestMemory: '8.0Gi', network: 'host', command: 'cat'),
109-
]) {
110-
node('simucast-test-server-ubuntu') {
111-
container('simucast-test-server-ubuntu') {
112-
sh "/root/startRun.sh $env.gitlab_username $env.gitlab_password ubuntu test ${env.GIT_COMMIT} ConferenceClient_API_3"
113-
}
114-
}
115-
}
116-
}
117-
}
83+
11884

11985
}
12086
}
@@ -140,3 +106,4 @@ pipeline {
140106
}
141107
}
142108

109+

0 commit comments

Comments
 (0)