Nuget manual publish syntax

anthony.steele's Avatar

anthony.steele

01 Aug, 2018 08:25 AM

We currently have builds pushed to nuget with on: appveyor_repo_tag: true
And we want to turn this off and publish to nuget only via the UI when we chose to.
The docs are not clear on how to do this.
e.g. does this:

    on:
           appveyor_repo_tag: false

mean "publish whenever there isn't a tag" or "do not publish, regardless of tags" ?

If I delete the "on" block entirely does that mean always publish, or never publish?

If I want to never automatically publish, is there a simple syntax for this, or can I hack it for a condition that is always false, e.g.

    on:
      branch: nosuchbranchexists
  1. Support Staff 1 Posted by Ilya Finkelshte... on 01 Aug, 2018 09:17 AM

    Ilya Finkelshteyn's Avatar

    In your case you do not need inline deployment at all, but you need environment deployment. Please read the difference here. So you simple need to delete your existing inline deployment from that YAML and create new one at https://ci.appveyor.com/environments. Then you will be able to deploy artifacts from any successful build manually.

  2. 2 Posted by anthony.steele on 01 Aug, 2018 09:25 AM

    anthony.steele's Avatar

    Thanks.

    We already have a "nuget.org" environment.

    Is the fact that we have a "deploy" button at top right the "latest build" page the result of this existing environment, or is it caused by the inline?

  3. Support Staff 3 Posted by Ilya Finkelshte... on 01 Aug, 2018 09:29 AM

    Ilya Finkelshteyn's Avatar

    This button simple allows you to select environment to deploy artifacts from build you open. It can be also not latest build, but any other successful build you select from the builds history.
    If you go from some specific environment, UI will allow you to choose project and them specific build from its history.

  4. 4 Posted by anthony.steele on 01 Aug, 2018 09:43 AM

    anthony.steele's Avatar

    So, I think you're saying that the "deploy" button at top right the "latest build" page (and other pages) *is* the result of this existing environment, not the appveyor.yml configuration?

  5. Support Staff 5 Posted by Ilya Finkelshte... on 01 Aug, 2018 09:56 AM

    Ilya Finkelshteyn's Avatar

    No. This button exists even if you have zero deployment environments, you will simple see no environments to select from in the drop-down if you press this button before creating any environment.

  6. 6 Posted by anthony.steele on 01 Aug, 2018 10:01 AM

    anthony.steele's Avatar

    Ok thanks for being precise though still not clear about the thing that I was asking. You are also (I think) saying that the fact that the deploy button *is usable* is due to environments, not the appveyor.yml configuration.

  7. Support Staff 7 Posted by Ilya Finkelshte... on 01 Aug, 2018 10:07 AM

    Ilya Finkelshteyn's Avatar

    Exactly, this button links specific build (it's artifacts) to environments (which are being configured in UI, not YAML). I think if you play with UI from both sides (this button and also "Deploy" menu for specific environment), you can get the feeling how builds and environments can be glued together.

    Main idea behind environments is to decouple deployment from build so you can deploy the same bits (specific build artifacts) multiple time at any moment, without re-building.

  8. Ilya Finkelshteyn closed this discussion on 01 Oct, 2018 09:00 PM.

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

Recent Discussions

23 Oct, 2018 10:37 PM
23 Oct, 2018 08:45 PM
23 Oct, 2018 07:48 PM
23 Oct, 2018 06:50 PM
23 Oct, 2018 06:06 PM