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!

Deployment pipleline issue



  • Hopefully I can describe this in an understandable way...

    We are building artifacts in Jenkins and placing them in artifactory along with a deployment script.

    As we deploy from buildmaster we are getting the artifacts from an artifactory repository, deploying them to an envrionment, and then moving them from the original artifactory repository to the next one. The idea being that the environments that we deploy to dev, sit, uat, prd are matched in artifactory.

    The problem comes when we look at forcing a deployment to an environment further down the chain as we cannot grab the artifacts from the previous envrionment because its not there.

    How would you recommed we deal with artifacts in this type of approach?

    Caveats:

    • We cannot use BuildMasters built in artifact management due to corprate standards
    • We need to automatically cleanup old artifacts in artifactory (hence the idea of a repository per envrionment where we'd just keep the last few deployments to each envrionment, copying from the previous repository to the new one as it gets deployed)

    I'm now wondering if it's feasible to have a single repository with all every artifact ever built, but automatically delete builds that have been rejected or overridden by subsequent deployment to an envrionment. Not sure if your api can provide that sort of info...

    Cheers
    Andrew

    Product: BuildMaster
    Version: 4.5.3



  • Hi Andrew,

    I chatted with a few folks here, and we're not exactly sure the best way to accomplish given the constraints :)

    The idea of a "single repository with every artifact" seems like a good approach, based on my understanding of the requirements, and you could make an event listener that listens to "Release Deployed" or "Build Rejected" to then go and purges artifacts.

    I'm not sure if that helps?



  • I hadn't thought of using BuildMaster like that. What I have implemented and seems to work well is a groovy script that make use of the BuildMaster and Artifactory json api's:

    1. Get List of all envrionment for this Application using GetEnvironments api
    2. For each environment get a list of the last 'X' builds and add to a list of of versions to keep using GetExecutions. As a build may get reapplied to the same envrionment several times to repair a failed deployment I get more than I need and only keep the to X unqiue versions for that environment.
    3. Get a list of folders from Artifactory for our application (each build is stored in seperate folder) using FolderInfo api
    4. For each folder returned, check its in our keep list, if not delete it using DeleteItem api

Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation