Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-28579

Add support for local/production Jenkins deployment

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • 4.30.x
    • 4.25.0.AM1
    • qa
    • None
    • Medium
    • ---

    Description

      Add support for local/production Jenkins deployment and distinguishing between those 2 mods using some parameter or environment variable

       

      Investigate info from Radim Hopp:

      The solution is:

      • chnage casc.yaml (use yq and put it to new file local_casc.yaml, do not change original casc.yaml)
      • Use local_casc.yaml to start local Jenkins. But here is an problem with giving the file to the script. because of that there is an hacover on lines 38-53. There is also a link to an issue, which is already resolved. The hackaround should not be needed anymore. To the JCASC_CUSTOM_DOCKER_RUN_OPTS variable you can put -e CASC_JENKINS_CONFIG=/tmp/config/local_casc.yaml 

       

      Pseudocode:

      # Delete if local_casc.yaml already exists
      set -x
      PWD=$(dirname ${BASH_SOURCE[0]})
      if [ -f $PWD/local_casc.yaml ]; then
          rm local_casc.yaml
      fi## DO ANYTHING YOU WANT WITH CASC.YAML HERE:
      cat $PWD/casc.yaml | \
          yq -y '.jenkins.clouds[]?.openstack.templates[]?.slaveOptions.instancesMin |= if (. != null) then 0 else empty end' | \
          yq -y '.jenkins.clouds[]?.openstack.templates[]?.slaveOptions.retentionTime |= if (. != null) then 0 else empty end' \
          > $PWD/local_casc.yaml## export JCASC_CUSTOM_DOCKER_RUN_OPTS
      export JCASC_CUSTOM_DOCKER_RUN_OPTS="-e CASC_JENKINS_CONFIG=${PWD}/local_casc.yaml"## Start jenkins
      $JENKINS_CSB_REPO/cci-jd/setup.sh $PWD

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            zcervink Zbyněk Červinka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: