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

MSDeploy ERROR_SITE_DOES_NOT_EXIST does not fail job

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Environment:
    • Similar Issues:

      Description

      We have a Jenkins Pipeline job setup to use MSDeploy to deploy to our dev environment. We have a groovy file checked into source control that runs the deployment of several different applications. Each application then downloads and calls this file. When MSDeploy encounters an error such as Error Code: ERROR_USER_NOT_ADMIN, the job fails as expected. If someone fat fingers the "IIS Web Application Name" in the SetParameters.xml file, you can see the error in the Jenkins Logs

      15:55:36 Error Code: ERROR_SITE_DOES_NOT_EXIST
      15:55:36 More Information: Site 'dev.mysite.com1' does not exist. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SITE_DOES_NOT_EXIST.
      15:55:36 Error count: 1.
      [Pipeline] }
      [Pipeline] // withCredentials
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // script
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS

      but the job still exists as successful.

      Excerpt from Pipeline Job Groovy:

      Stages = load "DeployTo_Test.Groovy"
      Stages.Deploy(DROP_FOLDER, PROJECT_NAME, VER_DEPLOY_TO)

      Excerpt from DeployTo_Test.Groovy

      def Deploy(DROP_FOLDER, PROJECT_NAME, VER_DEPLOYMENT_LOCATION) {
      ...SetSomeValues
      bat "pushd ${COMMAND_LOC_TO_RUN} && ${PROJECT_NAME}.deploy.cmd /Y /M:${deploymentMachines[i]} /U:%DeployUsername% /P:%DeployPassword% -setParamFile:%workspace%
      ${SetParamFile}"
      }

      Logs from a different MSDeploy error that fails the job

      16:16:48 Error Code: ERROR_USER_NOT_ADMIN
      16:16:48 More Information: Connected to 'myMachine.com' using the Web Deployment Agent Service, but could not authorize. Make sure you are an administrator on 'myMachine.com'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
      16:16:48 Error: The remote server returned an error: (401) Unauthorized.
      16:16:48 Error count: 1.
      [Pipeline] }
      [Pipeline] // withCredentials
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // script
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -1
      Finished: FAILURE

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              justinnimmo Justin Nimmo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: