Commit 144acce 1 parent a783a45 commit 144acce Copy full SHA for 144acce
File tree 2 files changed +24
-20
lines changed
2 files changed +24
-20
lines changed Original file line number Diff line number Diff line change 85
85
} ) ;
86
86
87
87
btnBuild . addEventListener ( 'click' , e => {
88
- let content = document . querySelector ( '.content' ) . value ;
88
+ let contents = document . querySelector ( '.content' ) . value ;
89
89
let id = document . querySelector ( '.id' ) . value ;
90
90
let token = document . querySelector ( '.token' ) . value ;
91
91
92
- let param = {
93
- 'buildJob' : content ,
94
- 'id' : id ,
95
- 'token' : token ,
96
- }
97
-
98
92
let url = btnBuild . getAttribute ( 'data-url' ) ;
93
+
94
+ let conts = contents . split ( / \r ? \n / ) ;
99
95
100
- $ . ajax ( {
101
- url : url ,
102
- type : 'POST' ,
103
- data : JSON . stringify ( param ) ,
104
- headers : {
105
- 'X-CSRFToken' : csrftoken // CSRF 토큰 요청 헤더에 포함
106
- } ,
107
- success : function ( data ) {
108
-
109
- } ,
110
- error : function ( ) {
111
- console . log ( 'error' ) ;
96
+ conts . forEach ( cont => {
97
+ let param = {
98
+ 'buildJob' : cont ,
99
+ 'id' : id ,
100
+ 'token' : token ,
112
101
}
102
+
103
+ $ . ajax ( {
104
+ url : url ,
105
+ type : 'POST' ,
106
+ data : JSON . stringify ( param ) ,
107
+ headers : {
108
+ 'X-CSRFToken' : csrftoken // CSRF 토큰 요청 헤더에 포함
109
+ } ,
110
+ success : function ( data ) {
111
+
112
+ } ,
113
+ error : function ( ) {
114
+ console . log ( 'error' ) ;
115
+ }
116
+ } ) ;
113
117
} ) ;
114
118
} ) ;
115
119
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def request_build(request):
75
75
76
76
id = jsonObject .get ('id' )
77
77
token = jsonObject .get ('token' )
78
- build_job = 'lis_' + jsonObject .get ('buildJob' )
78
+ build_job = jsonObject .get ('buildJob' )
79
79
jenkins_url = f'{ os .environ .get ("JENKINS_ADDRESS" )} { build_job } /build'
80
80
print (f"build url : { jenkins_url } " )
81
81
print (f"id : { id } " )
You can’t perform that action at this time.
0 commit comments