@@ -27,7 +27,8 @@ export default function ConfigurePage() {
2727 useEffect ( ( ) => {
2828 if ( ! repo || ! branch ) return ;
2929 pipeline . loadAwsRoles ?.( ) . catch ( console . error ) ;
30- } , [ repo , branch , pipeline ] ) ;
30+ // eslint-disable-next-line react-hooks/exhaustive-deps
31+ } , [ ] ) ;
3132
3233 async function regenerateNow ( ) {
3334 if ( ! repo || ! branch ) return ;
@@ -74,6 +75,18 @@ export default function ConfigurePage() {
7475 </ div >
7576 </ div >
7677
78+ { /* Provider */ }
79+ < label className = "space-y-2" >
80+ < div className = "font-medium" > Provider</ div >
81+ < select
82+ value = { pipeline . provider }
83+ onChange = { ( e ) => pipeline . setProvider ?.( e . target . value as "aws" | "jenkins" ) }
84+ className = "block rounded-md border px-3 py-2"
85+ >
86+ < option value = "aws" > AWS (OIDC)</ option >
87+ < option value = "jenkins" > Jenkins</ option >
88+ </ select >
89+ </ label >
7790 { /* Template */ }
7891 < label className = "space-y-2" >
7992 < div className = "font-medium" > Template</ div >
@@ -182,59 +195,63 @@ export default function ConfigurePage() {
182195 </ form >
183196 </ div >
184197
185- { /* ====== Options (auto-updated by chat) ====== */ }
186- < div className = "grid gap-3" >
187- < label className = "grid gap-1" >
188- < span className = "text-sm font-medium" > Node version</ span >
189- < input
190- value = { pipeline . options ?. nodeVersion ?? "" }
191- onChange = { ( e ) => pipeline . setOption ?.( "nodeVersion" , e . target . value ) }
192- className = "rounded-md border px-3 py-2"
193- />
194- </ label >
195- < label className = "grid gap-1" >
196- < span className = "text-sm font-medium" > Install command</ span >
197- < input
198- value = { pipeline . options ?. installCmd ?? "" }
199- onChange = { ( e ) => pipeline . setOption ?.( "installCmd" , e . target . value ) }
200- className = "rounded-md border px-3 py-2"
201- />
202- </ label >
203- < label className = "grid gap-1" >
204- < span className = "text-sm font-medium" > Test command</ span >
205- < input
206- value = { pipeline . options ?. testCmd ?? "" }
207- onChange = { ( e ) => pipeline . setOption ?.( "testCmd" , e . target . value ) }
208- className = "rounded-md border px-3 py-2"
209- />
210- </ label >
198+ { pipeline . provider === "aws" && (
199+ < >
200+ { /* ====== Options (auto-updated by chat) ====== */ }
201+ < div className = "grid gap-3" >
202+ < label className = "grid gap-1" >
203+ < span className = "text-sm font-medium" > Node version</ span >
204+ < input
205+ value = { pipeline . options ?. nodeVersion ?? "" }
206+ onChange = { ( e ) => pipeline . setOption ?.( "nodeVersion" , e . target . value ) }
207+ className = "rounded-md border px-3 py-2"
208+ />
209+ </ label >
210+ < label className = "grid gap-1" >
211+ < span className = "text-sm font-medium" > Install command</ span >
212+ < input
213+ value = { pipeline . options ?. installCmd ?? "" }
214+ onChange = { ( e ) => pipeline . setOption ?.( "installCmd" , e . target . value ) }
215+ className = "rounded-md border px-3 py-2"
216+ />
217+ </ label >
218+ < label className = "grid gap-1" >
219+ < span className = "text-sm font-medium" > Test command</ span >
220+ < input
221+ value = { pipeline . options ?. testCmd ?? "" }
222+ onChange = { ( e ) => pipeline . setOption ?.( "testCmd" , e . target . value ) }
223+ className = "rounded-md border px-3 py-2"
224+ />
225+ </ label >
226+ < label className = "grid gap-1" >
227+ < span className = "text-sm font-medium" > Build command</ span >
228+ < input
229+ value = { pipeline . options ?. buildCmd ?? "" }
230+ onChange = { ( e ) => pipeline . setOption ?.( "buildCmd" , e . target . value ) }
231+ className = "rounded-md border px-3 py-2"
232+ />
233+ </ label >
234+ </ div >
235+
236+ { /* ====== AWS Role ====== */ }
211237 < label className = "grid gap-1" >
212- < span className = "text-sm font-medium" > Build command</ span >
213- < input
214- value = { pipeline . options ?. buildCmd ?? "" }
215- onChange = { ( e ) => pipeline . setOption ?.( "buildCmd" , e . target . value ) }
216- className = "rounded-md border px-3 py-2"
217- />
238+ < span className = "text-sm font-medium" > AWS Role (OIDC)</ span >
239+ < select
240+ disabled = { busy }
241+ value = { pipeline . options ?. awsRoleArn ?? "" }
242+ onChange = { ( e ) => pipeline . setOption ?.( "awsRoleArn" , e . target . value ) }
243+ className = "rounded-md border px-3 py-2 text-white bg-black"
244+ >
245+ < option value = "" > -- select --</ option >
246+ { pipeline . roles ?. map ( ( r : any ) => (
247+ < option key = { r . arn } value = { r . arn } >
248+ { r . name }
249+ </ option >
250+ ) ) }
251+ </ select >
218252 </ label >
219- </ div >
220-
221- { /* ====== AWS Role ====== */ }
222- < label className = "grid gap-1" >
223- < span className = "text-sm font-medium" > AWS Role (OIDC)</ span >
224- < select
225- disabled = { busy }
226- value = { pipeline . options ?. awsRoleArn ?? "" }
227- onChange = { ( e ) => pipeline . setOption ?.( "awsRoleArn" , e . target . value ) }
228- className = "rounded-md border px-3 py-2 text-white bg-black"
229- >
230- < option value = "" > -- select --</ option >
231- { pipeline . roles ?. map ( ( r : any ) => (
232- < option key = { r . arn } value = { r . arn } >
233- { r . name }
234- </ option >
235- ) ) }
236- </ select >
237- </ label >
253+ </ >
254+ ) }
238255
239256 { /* ====== Actions ====== */ }
240257 < div className = "flex gap-3" >
0 commit comments