Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Download artifact from Jenkins with the BuildMaster extension

    Scheduled Pinned Locked Moved Support
    buildmasterartifactsjenkins
    6 Posts 2 Posters 155 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Good afternoon everybody,

      I have a question regarding the fetching of data from Jenkins through the Jenkins extension.

      Our artifacts are located under these url path: http://[server]:8082/job/[application]/[job number]/[artifactory path]$[application-ear]/artifact/

      While the Jenkins extension of BuildMaster looks for a path like this: http://[server]:8082/job/[application]/[job number]/artifact/ (missing one part of the URL)

      We have checked this in WireShark. The exception we get from BuildMaster is the next one:

      DEBUG: Build number is not an integer, resolving special build number "lastSuccessfulBuild"...
      INFO: Importing Careunit sonar from Careunit sonar...
      DEBUG: Temp file: C:\Windows\TEMP\tmpE224.tmp
      DEBUG: Downloading artifact...
      ERROR: Unhandled exception: System.Net.WebException: The remote server returned an error: (404) Not Found.
      at System.Net.WebClient.DownloadFile(Uri address, String fileName)
      at Inedo.BuildMasterExtensions.Jenkins.JenkinsClient.Download(String url, String toFileName)
      at Inedo.BuildMasterExtensions.Jenkins.JenkinsBuildImporter.Import(IBuildImporterContext context)
      at Inedo.BuildMaster.Windows.ServiceApplication.PlanExecuter.PromotionExecution.Execute()

      Thank you in advance!

      Nick

      Product: BuildMaster
      Version: 4.9.1

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        I've published a new version of the Jenkins Extension (4.7) that logs all URLS, so it might be a little easier to diagnose the specific urls, as it will now be in the log.

        If you look at the source code, the entire artifact retreived is "/job/[jobName]/[buildNumber]/artifact/*zip*/archive.zip", and based on the logs, lastSuccessfulBuild is the build number being used.

        Not sure if that's helpful though...

        1 Reply Last reply Reply Quote 0
        • T Offline
          tbl_5153
          last edited by

          We kinda have the same issue.
          We do not use the default setup for artifacts but use a plugin for Jenkins to export to an alternate destination..
          It would be nice if you could set the path of the artifact in the extension.
          But the path must be able to contain variables that are resolved at runtime, so it might be pretty difficult.

          After using some hours trying to solve the issue ald also looking into the extension source we have chosen to add a buildstep to Jenkins where we use
          OctoPack to create a nuget package of the deployable artifact and the upload that artifact to Proget.

          Now we have applications in Buildmaster that will get the artifact from proget and deploy from there.

          You could also add scripting to Jenkins to trigger Buildmaster every time a job in jenkins has succeeded successfully and then it can automagically deploy, but so far we are triggering deployments manually.

          Regards
          Thomas

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Thanks for the feedback; we've been seeing a lot of heavy customizations of CI systems (or ones, like Cruise Control, with no API at all), which makes it challenging for BuildMaster to "pull" build artifacts out.

            A big part of our ProGet 4.0 (which is due in just a week or so :D) release will be the idea of a "universal/proget" package type, so it will be much easier to push artifact packages (as easy as zip + cUrl!) and consume them without having to NuGet (which, is really just a zip file with in an awkward protocol/metadata format).

            1 Reply Last reply Reply Quote 0
            • T Offline
              tbl_5153
              last edited by

              Releasing Proget 4.0 with the new package type sounds nice and will simplify our deployments significantly (event thou i have everything working in Jenkins in regards to creating nuget artifacts and uploading them to proget).

              Looking forward for the new Proget :-)

              1 Reply Last reply Reply Quote 0
              • T Offline
                tbl_5153
                last edited by

                Alana.
                I have made a pull request https://github.com/Inedo/bmx-windows/pull/30
                Thanks for pointing me in that direction.
                It was indeed very easy to modify the codebase.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation