Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-3843

Allow users to specify environment variables through the rhc-worker-script configuration file to be passed down to the scripts being executed

      The rhc-worker-script is about to allow customers to specify environment variables in a configuration file. For the conversion use case, the variables need to be defined in /etc/rhc/workers/rhc-worker-script.yml.

      Example of the yml file:

       

      env:
        # environment variables to be set for the script
        FOO: "some-string-value"
        BAR: "other-string-value"
        # ...
      

       

      Acceptance criteria:

      • Verification confirms that with the latest rhc-worker-script scratch/brew builds customers can pass variables such as CONVERT2RHEL_OUTDATED_PACKAGE_CHECK_SKIP (or any other from https://github.com/oamg/convert2rhel/wiki/Environment-variables) to convert2rhel when converting through Insights
        • For instance when testing the CONVERT2RHEL_OUTDATED_PACKAGE_CHECK_SKIP variable, run the pre-conversion analysis Insights task on a system with some packages being outdated, see the inhibitor in the analysis result, then create the toml file, re-run the analysis, and the inhibitor should not be in the result anymore. Additionally, check that the variable is captured in the /etc/migration-results and the /etc/rhsm/facts/convert2rhel.facts breadcrumbs files.

        1. journalctl_rhcd.log
          78 kB
          Sergio Santamaria Riocerezo
        2. journalctl.log
          79 kB
          Link Dupont
        3. journalctl 2024-04-05 12-54-12.log
          79 kB
          Sergio Santamaria Riocerezo
        4. Screenshot from 2024-04-02 10-29-10.png
          101 kB
          Sergio Santamaria Riocerezo
        5. Screenshot from 2024-04-05 12-54-12.png
          217 kB
          Sergio Santamaria Riocerezo

            rolivier@redhat.com Rodolfo Olivieri
            mbocek@redhat.com Michal Bocek
            Sergio Santamaria Riocerezo
            None
            Alexandra Nikandrova Alexandra Nikandrova
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: