File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ var args struct {
3131 shape string
3232 shapeOcpus float32
3333 shapeMemoryInGBs float32
34+ runEnv string
3435}
3536
3637func main () {
@@ -58,9 +59,13 @@ func run(cmd *cobra.Command, argv []string) error {
5859
5960 // List Images and retrieve the latest ID by type and arch
6061
62+ osname := fmt .Sprintf ("ubuntu-24.04-%s-gha-image" , args .arch )
63+ if args .runEnv != "production" {
64+ osname = fmt .Sprintf ("rc-ubuntu-24.04-%s-gha-image" , args .arch )
65+ }
6166 images , err := computeClient .ListImages (ctx , core.ListImagesRequest {
6267 CompartmentId : common .String (args .compartmentId ),
63- OperatingSystem : common .String (fmt . Sprintf ( "ubuntu-24.04-%s-gha-image" , args . arch ) ),
68+ OperatingSystem : common .String (osname ),
6469 SortBy : core .ListImagesSortByTimecreated ,
6570 SortOrder : core .ListImagesSortOrderDesc ,
6671 Limit : common .Int (1 ),
@@ -232,4 +237,10 @@ func init() {
232237 0.0 , // Default to 0.
233238 "Amount of memory in GBs for flexible shapes (e.g., 16.0, 32.0). Required if a '.Flex' shape is used." ,
234239 )
240+ flags .StringVar (
241+ & args .runEnv ,
242+ "running-environment" ,
243+ "production" ,
244+ "Running Environment: production or ci" ,
245+ )
235246}
You can’t perform that action at this time.
0 commit comments