Multiple deployments / environments from one repository

Gordon's Avatar

Gordon

Jun 22, 2015 @ 09:06 AM

Hi, I have a quick question.

We have a single repository. It has a develop branch and a master branch.

I created a project, pointed it to the repository and created an environment so on each commit it does an deployment to the stage server. all good so far.

We have 2 servers running the production version of the site. So I created 2 separate environments, each one deploying to the separate servers and they need to be triggered manually.

The problems we are having is that you can deploy any project to any environment. Is it possible to limit environments to projects? (We had a developer deploy a different project to the production environment which is just human error)

Is this the correct way of doing things? Should we rather be creating a separate project for each deployment i.e. 3 different projects? Deployments don't currently support selecting different branches or path within a repo so this is not ideal either?

Is this possible and what's the recommended strategy regarding this.

Regards

Gordon

  1. Support Staff 1 Posted by Feodor Fitsner on Jun 23, 2015 @ 02:52 AM

    Feodor Fitsner's Avatar

    Hi Gordon,

    That's correct way of doing things - have one project and multiple environments. Unfortunately, there is no way to "lock" environments within some projects. Feel free to submit a new issue here: https://github.com/appveyor/ci/issues

  2. 2 Posted by mabrahams675 on Aug 10, 2017 @ 02:13 AM

    mabrahams675's Avatar

    The way that I've found to address this problem is to specify a different artefact name for develop and master (during the build). Then in the environments config, I have to specify the artifact name that will be deployed.

    So there is still no lock, however if someone accidentally triggers a dev build to go to production, nothing will be deployed because there's no matching artifacts.

    The only thing that I don't like about this solution is that the deploy is still marked as successful, however if you look in the log it will say that nothing was deploy.

  3. 3 Posted by Ilya Finkelshte... on Aug 11, 2017 @ 01:47 AM

    Ilya Finkelshteyn's Avatar

    @mabrahams675 Right, we have issue for this, will try to force the fix

  4. Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 02:19 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac