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

Git submodules, option for reseting local changes on submodules

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None
    • windows 2012R2
      Jenkins ver. 1.605
      GIT client plugin 1.16.1
      GIT plugin 2.3.5

      When working with submodules and submodule modifies some tracked files during build,
      the consecutive builds will file on submodule update, with a git error of unstaged changes.

      Although build should not change tracked files it could happen due to programmer mistake.

      One can bypass it with
      git submodule foreach git checkout %sha1%
      as a first build step

      Note that git clean is not an option for builds that uses bower or npm, since they download packages from web, and generally work very long.

          [JENKINS-27625] Git submodules, option for reseting local changes on submodules

          Roman Wieczorek created issue -
          Roman Wieczorek made changes -
          Description Original: When working with submodules and submodule modifies some tracked files during build,
          the consecutive builds will file on submodule update, with a git error of unstaged changes.

          Although build should not change tracked files it could happen due to programmer mistake.

          One can bypass it with
          git -C jobs/%JOB_NAME%/workspace/submodule reset --hard || true

          Note that git clean is not an option for builds that uses bower or npm, since they download packages from web, and generally work very long.
          New: When working with submodules and submodule modifies some tracked files during build,
          the consecutive builds will file on submodule update, with a git error of unstaged changes.

          Although build should not change tracked files it could happen due to programmer mistake.

          One can bypass it with
          {{git submodule foreach git checkout %sha1%}}
          as a first build step

          Note that git clean is not an option for builds that uses bower or npm, since they download packages from web, and generally work very long.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 161837 ] New: JNJira + In-Review [ 180861 ]
          Nicolas De Loof made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]

            Unassigned Unassigned
            fantastory Roman Wieczorek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: