How to deploy to s3 based on environmental variables?

Davide Bortolami's Avatar

Davide Bortolami

09 Nov, 2017 03:42 PM

We'd like to deploy to S3 based on the name of the commit SHA hash, for example to s3://my-software/nightly/200355b5cad17e5d602f22c5b5a6c6329d9e1ef7/

But I can't seem to be able to get the environmental variables into the deployment. On Travis I can simply use something like $TRAVIS_COMMIT. Is it possible on appveyor?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 09 Nov, 2017 08:34 PM

    Ilya Finkelshteyn's Avatar

    Here is YAML example. If you use UI, (or Deployment Environment) settings should be easy to guess.

    - provider: S3
      . . . 
      bucket: my-software
      folder: nightly/$(APPVEYOR_REPO_COMMIT)

    I assume that you are asking about folder name, not a artifact file name. If you need to alter artifact file name, please share your YAML and we can help with the approach.

  2. 2 Posted by Davide Bortolam... on 09 Nov, 2017 10:06 PM

    Davide Bortolami's Avatar

    Great, it worked, thank you very much.
    It was not clear to me by the documentation I needed to use the two

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:21 AM.

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

Keyboard shortcuts


? 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