Multiple deployments / environments from one repository

Gordon's Avatar

Gordon

22 Jun, 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 23 Jun, 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 10 Aug, 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. Support Staff 3 Posted by Ilya Finkelshte... on 11 Aug, 2017 01:47 AM

    Ilya Finkelshteyn's Avatar

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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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