@@ -345,6 +345,10 @@ Be aware that any TODO requires your attention before your run the final test!
345345 Name : "exclude-refs" ,
346346 Usage : "Patterns to exclude specific refs (e.g., beta,rc,v0,v1)" ,
347347 },
348+ & cli.BoolFlag {
349+ Name : "skip-pull" ,
350+ Usage : "Skip docker pull; use locally built images (e.g. for local testing)" ,
351+ },
348352 },
349353 Usage : "Rollbacks N versions back, runs the test the upgrades CL nodes with new versions" ,
350354 Action : func (c * cli.Context ) error {
@@ -362,6 +366,7 @@ Be aware that any TODO requires your attention before your run the final test!
362366
363367 nop := c .String ("nop" )
364368 sotURL := c .String ("sot-url" )
369+ skipPull := c .Bool ("skip-pull" )
365370
366371 // test logic is:
367372 // - rollback to selected ref
@@ -393,7 +398,7 @@ Be aware that any TODO requires your attention before your run the final test!
393398 Msg ("Formed upgrade sequence" )
394399 // if no commands just show the tags and return
395400 if buildcmd == "" || envcmd == "" || testcmd == "" {
396- framework .L .Info ().Msg ("No envcmd or testcmd provided, skipping" )
401+ framework .L .Info ().Msg ("No envcmd or testcmd or buildcmd provided, skipping" )
397402 return nil
398403 }
399404 // checkout the oldest ref
@@ -410,7 +415,9 @@ Be aware that any TODO requires your attention before your run the final test!
410415
411416 // setup the env and verify with test command
412417 framework .L .Info ().Strs ("Sequence" , refs ).Msg ("Running upgrade sequence" )
418+ // first env var is used by devenv, second by simple nodeset to override the image
413419 os .Setenv ("CHAINLINK_IMAGE" , fmt .Sprintf ("%s:%s" , registry , refs [0 ]))
420+ os .Setenv ("CTF_CHAINLINK_IMAGE" , fmt .Sprintf ("%s:%s" , registry , refs [0 ]))
414421 if _ , err := framework .ExecCmdWithContext (c .Context , buildcmd ); err != nil {
415422 return err
416423 }
@@ -427,8 +434,10 @@ Be aware that any TODO requires your attention before your run the final test!
427434 Str ("Version" , tag ).
428435 Msg ("Upgrading nodes" )
429436 img := fmt .Sprintf ("%s:%s" , registry , tag )
430- if _ , err := framework .ExecCmdWithContext (c .Context , fmt .Sprintf ("docker pull %s" , img )); err != nil {
431- return fmt .Errorf ("failed to pull image %s: %w" , img , err )
437+ if ! skipPull {
438+ if _ , err := framework .ExecCmdWithContext (c .Context , fmt .Sprintf ("docker pull %s" , img )); err != nil {
439+ return fmt .Errorf ("failed to pull image %s: %w" , img , err )
440+ }
432441 }
433442 for i := range nodes {
434443 if err := framework .UpgradeContainer (c .Context , fmt .Sprintf (nodeNameTemplate , i ), img ); err != nil {
0 commit comments