Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72005

Cannot run Groovy script to list aws ecr repositories

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • active-choices-plugin
    • None
    • Active Choices Plug-in
      Version2.7.2, Jenkins Version 2.414.1

      I want to run this script in order to get aws ecr repositories:

       

      def profile = "ecr"
      def region = "us-east-1"
      def cmd_output = "aws ecr describe-repositories --region $region --output yaml".execute()
      def awk_cmd_output = cmd_output | ['awk', '/repositoryName:/ \{print $2}'].execute()
      def repo_names = awk_cmd_output.text.tokenize().reverse()
      return repo_names

      Before 2 months this script was working fine but into the latest version it's no longer working.

       

          [JENKINS-72005] Cannot run Groovy script to list aws ecr repositories

          Before looking at the code, can you check

          • Do you have anything in the Jenkins logs (you must increase the verbosity and include org.biouno.unochoice in the loggers)
          • Any JS console errors?

          Without a sample Groovy script to reproduce, this issue may be closed. So it's simpler if you can test a simpler script that can be executed by anybody else. For example, try a Groovy script that returns a list of repositories (without actually using AWS).

          Cheers

          Bruno P. Kinoshita added a comment - Before looking at the code, can you check Do you have anything in the Jenkins logs (you must increase the verbosity and include org.biouno.unochoice in the loggers) Any JS console errors? Without a sample Groovy script to reproduce, this issue may be closed. So it's simpler if you can test a simpler script that can be executed by anybody else. For example, try a Groovy script that returns a list of repositories (without actually using AWS). Cheers

          Peter added a comment -

          I not Chrome's Firebug console I get:

          Could not find element by name, perhaps it is a DIV?
          UnoChoice.js:1 Updating cascade of parameter [ REPO_NAME ] ...
          UnoChoice.js:1 Values retrieved from Referenced Parameters: 
          UnoChoice.js:1 Could not find element by name, perhaps it is a DIV?
          UnoChoice.js:1 Updating cascade of parameter [ IMAGE_TAG ] ...
          UnoChoice.js:1 Calling Java server code to update HTML elements...
          UnoChoice.js:1 Values returned from server: ,
          UnoChoice.js:1 Updating IMAGE_TAG from REPO_NAME
          

          Into log file I don't see errors.

          Peter added a comment - I not Chrome's Firebug console I get: Could not find element by name, perhaps it is a DIV? UnoChoice.js:1 Updating cascade of parameter [ REPO_NAME ] ... UnoChoice.js:1 Values retrieved from Referenced Parameters:  UnoChoice.js:1 Could not find element by name, perhaps it is a DIV? UnoChoice.js:1 Updating cascade of parameter [ IMAGE_TAG ] ... UnoChoice.js:1 Calling Java server code to update HTML elements... UnoChoice.js:1 Values returned from server: , UnoChoice.js:1 Updating IMAGE_TAG from REPO_NAME Into log file I don't see errors.

          Hi, thanks for checking the JS console. It indicates the plugin was not able to locate the HTML element of the referenced parameter. But the only way to debug it is by reproducing it locally (on a developer machine, running in debug mode, modifying the script and plugins installed, etc.). So for this case a Groovy script and perhaps a config.xml of the configuration would allow us to review what's wrong.

          Bruno P. Kinoshita added a comment - Hi, thanks for checking the JS console. It indicates the plugin was not able to locate the HTML element of the referenced parameter. But the only way to debug it is by reproducing it locally (on a developer machine, running in debug mode, modifying the script and plugins installed, etc.). So for this case a Groovy script and perhaps a config.xml of the configuration would allow us to review what's wrong.

            kinow Bruno P. Kinoshita
            peter_penzov Peter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: