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!

Deploy artifact without touching a certain subfolder?



  • Hi,

    I have been working on deployment of a web frontend that is managed by a CMS. In my build artifact I have all the files needed to redeploy, except for a folder "Images" that should be untouched during deployment. The images folder is managed by end users in the CMS.

    I'm looking for a solution where I deploy the artifact, but leave the Images folder untouched. I have been trying to first copy the folder out to another folder, and then copy it back after the artifact has been deployed, but this is generating a variety of access denied messages at seemingly random points, which give me the feeling this is not a reliable solution.

    Any other approaches that could be applied here?

    Best regards,

    Justin


  • inedo-engineer

    Hi @Justinvolved ,

    In this case, I would recommend staging the artifact files first, and then transferring them. Here is the OtterScript you can use for that:

    Deploy-Artifact;
    
    Transfer-Files
    (
        ToDirectory: c:\websites\the-website-root,
        Exclude: Images\**
    );
    

    Cheers,
    Alana



  • Hi @atripp,

    Thanks, that does sound like a good plan.
    Altough the script now executes without error, something is wrong, because the log seems to say the artifact was deployed correctly to the working dorectory. but it contains 0 files.
    38a7b542-1308-42f4-878d-d93ab1cfd96d-image.png

    However when I browse the Artifact I can see it does contain files. I must have something wrong still:
    345f6cce-0606-4a72-b39e-313aa4f4bf57-image.png

    Thanks,
    Justin


  • inedo-engineer

    Hi @Justinvolved,

    That message that says "currently contains 0 items" is just telling you that the folder that the artifact is deploying to contains 0 files. After that, it will deploy the artifact files. If you enable verbose logging (setting Verbose: true), you will see all the files transferred from the artifact to the working directory.

    Thanks,
    Rich


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation