Populating a projects "Deployments" using "deploy_script" section in appveyor.xml

Ben Hastings's Avatar

Ben Hastings

14 Mar, 2019 12:27 PM

Hi,

We're new users to Appveyor and are trying to create a configuration file which will run our tests on Windows & Linux and then deploy to an environment that isn't specified in Appveyors "Environments" section. Because we are deploying to http://pypi.org we need to use the deploy_script section rather than the deploy section.

Is there any way for us to populate the "deployments" section (see attached image) of our project?

Please see our current build script below

environment:
  matrix:
    # Windows w/64 bit Geo & python 3.6
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      PYTHON: "C:\\Python36-x64"

    # Ubuntu - python 3
    - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
      PYTHON: "3.6"

stack: python %PYTHON%

init:
  - python --version
  - cmd: set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
  - python --version

build: off

test_script:
  - python setup.py test

deploy_script:
  - python --version
  # deploy.sh just does `twine upload` to deploy our project
  - sh: "bash -e deploy.sh"

Thanks,

  1. Support Staff 1 Posted by Owen McDonnell on 14 Mar, 2019 03:50 PM

    Owen McDonnell's Avatar

    I'm not sure what you mean by 'an environment that isn't specified in Appveyors "Environments" section'.
    You mean you need to create one? That can be done with this API call and a deployment can be started to that environment with this API call.

  2. 2 Posted by Ben Hastings on 14 Mar, 2019 03:55 PM

    Ben Hastings's Avatar

    I don't think I can create one that fits my needs. My deployment is just uploading my python package to pypi which I don't think is covered by any of Appveyors environment providers.

    For example, in https://www.appveyor.com/docs/api/environments-deployments/#add-env... the provider is "FTP" which is not what I need to do - and none of the other providers (WebDeploy, Amazon S3 etc) fit my needs.

  3. Support Staff 3 Posted by Owen McDonnell on 14 Mar, 2019 04:43 PM

    Owen McDonnell's Avatar

    If you do not want to do this deployment "inline" from the build itself, then the other alternative i would suggest is a deployment project.

    It may not be quite as nice as having your deployments tab in the same project but it is one way to have custom deployment scripts and keep deployments asynchronous/separate from builds.

  4. Ilya Finkelshteyn closed this discussion on 14 May, 2019 09:01 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

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM