@@ -2,7 +2,7 @@ void setBuildStatus(String message, String state) {
22 step([
33 $class: "GitHubCommitStatusSetter",
44 reposSource: [$class: "ManuallyEnteredRepositorySource", url: "${REPO_URL}/owt-client-javascript"],
5- contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/ubuntuconference "],
5+ contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/ubuntuconference43x "],
66 errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]],
77 statusResultSource: [$class: "ConditionalStatusResultSource", results: [[$class: "AnyBuildResult", message: message, state: state]]]
88 ]);
@@ -19,11 +19,11 @@ pipeline {
1919 stages {
2020 stage('Unit test') {
2121 steps {
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')
22+ podTemplate(name: 'unit-js -ubuntu-'+env.GIT_BRANCH , label: 'unit-js -ubuntu-'+env.GIT_BRANCH , cloud: 'kubernetes', containers: [
23+ containerTemplate(name: 'test-images ', image: "$env.ubuntu_test_images43x ", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '1000m ', resourceLimitCpu: '2000m',resourceRequestMemory : '1.0Gi', resourceLimitMemory : '2.0Gi ', command: 'cat')
2424 ]) {
25- node('unit-test -ubuntu' ) {
26- container('unit- test-ubuntu ') {
25+ node('unit-js -ubuntu-'+env.GIT_BRANCH ) {
26+ container('test-images ') {
2727 sh "cd /root/owt-client-javascript/test/unit/karma-test/ && ./start.sh $env.GIT_BRANCH $env.CHANGE_ID"
2828 }
2929 }
@@ -33,12 +33,16 @@ pipeline {
3333 stage('Build package') {
3434 options { timeout(time: 20, unit: 'MINUTES') }
3535 steps {
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')
36+ podTemplate(name: 'packe-js-ubuntu-'+env.GIT_BRANCH, label: 'packe-js-ubuntu-'+env.GIT_BRANCH, cloud: 'kubernetes',
37+ volumes: [
38+ persistentVolumeClaim(claimName: 'js-ubuntu-package',mountPath: '/root/ubuntu_package',readOnly: false)
39+ ],
40+ containers: [
41+ containerTemplate(name: 'build-images', image: "$env.ubuntu_build_images43x", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '5000m', resourceLimitCpu: '6600m' , resourceRequestMemory: '3.0Gi', resourceLimitMemory: '4.0Gi', command: 'cat')
3842 ]){
39- node('pack-mcu -ubuntu' ) {
40- container('pack-on-ubuntu ') {
41- sh "/root/packSDKInDocker .sh $env.GIT_COMMIT $env.GIT_BRANCH $env.CHANGE_ID"
43+ node('packe-js -ubuntu-'+env.GIT_BRANCH ) {
44+ container('build-images ') {
45+ sh "/root/startRun .sh * * ubuntu build javascript $env.GIT_BRANCH $env.GIT_COMMIT $env.CHANGE_ID"
4246 }
4347 }
4448 }
@@ -48,35 +52,46 @@ pipeline {
4852 stage('Start test') {
4953 options { timeout(time: 40, unit: 'MINUTES') }
5054 parallel {
51- stage('API test ') {
55+ stage('ConferenceClient API 1 ') {
5256 steps {
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'),
57+ podTemplate(name: 'api-js-ubuntu-'+env.GIT_BRANCH, label: 'api-js-ubuntu-'+env.GIT_BRANCH, cloud: 'kubernetes',
58+ volumes: [
59+ persistentVolumeClaim(claimName: 'js-ubuntu-package', mountPath: '/root/ubuntu_package', readOnly: false),
60+ persistentVolumeClaim(claimName: 'js-ubuntu-log', mountPath: '/root/ubuntu_log', readOnly: false)
61+ ],
62+ containers: [
63+ containerTemplate(name: 'test-images', image: "$env.ubuntu_test_images43x", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '3000m', resourceLimitCpu: '4000m', resourceRequestMemory: '2.0Gi', resourceLimitMemory: '3.0Gi', command: 'cat'),
5564 ]) {
5665
57- node('api-test -ubuntu' ) {
58- container('api- test-ubuntu ') {
59- sh "/root/start .sh ${env.GIT_COMMIT}1 ConferenceClient_api "
66+ node('api-js -ubuntu-'+env.GIT_BRANCH ) {
67+ container('test-images ') {
68+ sh "/root/startRun .sh * * ubuntu test ${env.GIT_COMMIT} ConferenceClient_API_1 "
6069 }
6170 }
6271 }
6372 }
6473 }
6574
66- stage('Subscribe test ') {
75+ stage('ConferenceClient API 2 ') {
6776 steps {
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'),
77+ podTemplate(name: 'rest-js-ubuntu-'+env.GIT_BRANCH, label: 'rest-js-ubuntu-'+env.GIT_BRANCH, cloud: 'kubernetes',
78+ volumes: [
79+ persistentVolumeClaim(claimName: 'js-ubuntu-package', mountPath: '/root/ubuntu_package', readOnly: false),
80+ persistentVolumeClaim(claimName: 'js-ubuntu-log', mountPath: '/root/ubuntu_log', readOnly: false)
81+ ],
82+ containers: [
83+ containerTemplate(name: 'test-images', image: "$env.ubuntu_test_images43x", ttyEnabled: true, alwaysPullImage: true, privileged: true, resourceRequestCpu: '3000m', resourceLimitCpu: '4000m', resourceRequestMemory: '2.0Gi', resourceLimitMemory: '3.0Gi', command: 'cat'),
7084 ]) {
7185
72- node('subscribe-test -ubuntu' ) {
73- container('subscribe- test-ubuntu ') {
74- sh "/root/start .sh ${env.GIT_COMMIT}2 ConferenceClient_subscribe "
86+ node('rest-js -ubuntu-'+env.GIT_BRANCH ) {
87+ container('test-images ') {
88+ sh "/root/startRun .sh * * ubuntu test ${env.GIT_COMMIT} ConferenceClient_API_2 "
7589 }
7690 }
7791 }
7892 }
7993 }
94+
8095 }
8196 }
8297 }
@@ -97,3 +112,4 @@ pipeline {
97112 }
98113}
99114
115+
0 commit comments