Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1993

Customize settings.xml in igb-maven-install4j Docker image

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      To release IGB and other project artifacts to our Nexus maven repository, the release engineer (Dr. Loraine) manually runs "mvn deploy", which builds the artifacts and uploads them Nexus.

      This works OK so far, but there are some problems:

      • The build environment that gets used depends on whatever JRE or maven version that the release engineer has installed on their computer.
      • Write credentials for the Nexus maven repository have to be stored locally in the user's mvn settings.xml file.
      • The release engineer has to remember to deploy new artifacts.
      • The current process is manual. Mistakes are easy to make.

      Solution:

      We are already building artifacts using bitbucket pipelines. Let's enhance these pipelines to include an optional "deploy" step that uploads to our nexus repository.

      To do this, we need to customize the Docker image we created for building Java projects. See:

      Following the suggestion of Robert Scholte (see above link), we will add variables for Nexus user name and password to the settings file.

      Once that is done, we'll configure the bitbucket repository with repository environment variables and reference these in the maven build command.

      As a first step, we need to update the mvn settings in the Docker image we use for building IGB (and other java projects).

      Links:

      repo with Docker file, which will need to be edited:

      Loraine Lab Docker hub image

      Requirements:

      • Each Docker image requires a tag. The latest image is tagged with "jre-1.8.0_212". Tag the new Docker image with "jre-1.8.0_212-mvn-deploy". This ensures that you can deploy the new image without disrupting existing build pipelines, which are all referencing the image tagged with jre-1.8.0_212.

      Questions:

      • Where should the settings.xml file reside in the Docker image? This can be a user-level or system-level file. Which should this be?
      • Are there any maven commands that allow modifying settings? If yes, this could simplify the customization process.

        Attachments

          Issue Links

            Activity

            Hide
            prutha Prutha Kulkarni (Inactive) added a comment -

            Prof. [~aloraine], I have deployed the latest docker image to lorainlab account with name "lorainelab/igb-maven-install4j:jre-1.8.0-212-mvn-deploy".
            Also, I have tested it on my genoviz sdk fork. Since, I was using the changed bitbucket configuration of genoviz sdk to test the changes in the docker image. So I wanted to know if I can submit a pull request for genoviz repository also (with changed docker image name as well as new bitbucket configuration)?
            I am confused because we were using its pipeline configuration for testing even though there is a different ticket related to genoviz sdk which is IGBF-1945.
            Please let me know the same.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - Prof. [~aloraine] , I have deployed the latest docker image to lorainlab account with name "lorainelab/igb-maven-install4j:jre-1.8.0-212-mvn-deploy". Also, I have tested it on my genoviz sdk fork. Since, I was using the changed bitbucket configuration of genoviz sdk to test the changes in the docker image. So I wanted to know if I can submit a pull request for genoviz repository also (with changed docker image name as well as new bitbucket configuration)? I am confused because we were using its pipeline configuration for testing even though there is a different ticket related to genoviz sdk which is IGBF-1945 . Please let me know the same.
            Hide
            ann.loraine Ann Loraine added a comment -

            Thank you Prutha Kulkarni

            Please submit 2 PRs:

            • to genoviz sdk repository (to master)
            • to igb docker repository (if not already merged - new settings.xml file and Docker file as required)
            Show
            ann.loraine Ann Loraine added a comment - Thank you Prutha Kulkarni Please submit 2 PRs: to genoviz sdk repository (to master) to igb docker repository (if not already merged - new settings.xml file and Docker file as required)
            Hide
            ann.loraine Ann Loraine added a comment -

            Update:

            • igb docker PR merged
            Show
            ann.loraine Ann Loraine added a comment - Update: igb docker PR merged
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment -

            Prof. [~aloraine], I have also submitted a PR for genoviz sdk.
            code changes are present at: https://bitbucket.org/lorainelab/genoviz-sdk/pull-requests/17/igbf-1945/diff

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - Prof. [~aloraine] , I have also submitted a PR for genoviz sdk. code changes are present at: https://bitbucket.org/lorainelab/genoviz-sdk/pull-requests/17/igbf-1945/diff
            Hide
            ann.loraine Ann Loraine added a comment -

            I am able to build Genoviz SDK using the new Docker and configured as in above. The new Docker image appears to be working great. Marking this as "closed".

            Show
            ann.loraine Ann Loraine added a comment - I am able to build Genoviz SDK using the new Docker and configured as in above. The new Docker image appears to be working great. Marking this as "closed".

              People

              • Assignee:
                prutha Prutha Kulkarni (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: