Public Repository

Last pushed: 2 months ago
Short Description
Short description is empty for this repo.
Full Description

pipekit/appveyor

Trigger builds in Appveyor from a container, downloading artifacts on successful build

Requirements

  • The project has been added to Appveyor already
  • An Appveyor token

Usage

First, create a secret with your Appveyor token:

docker secret create appveyor -

Then, add the following step to your pipeline:

steps:
  appveyor:
    tasks:
      - image: pipekit/appveyor
        secrets:
          - source: appveyor
            target: token

Artifacts are automatically downloaded to /run/context/artifacts.

Environment variables

  • $REPOSITORY: (default: autodetected from context) the name of the GitHub repository in namespace/name format
  • $BRANCH: (default: master) the name of the branch to test
  • $REVISION: (default: autodetected from context) the commit hash to test
  • $ACCOUNT_NAME: (default: namespace of $REPOSITORY) to override the automatically detected account name
  • $PROJECT_SLUG: (default: repository name of $REPOSITORY) to override the automatically detected project slug
  • $CONTEXT: (default: /run/context) where to find the project for automatic detection of repository name and revision
  • $ARTIFACTS_PATH: (default: $CONTEXT/artifacts) where to download artifacts to
  • $TOKEN_FILE: (default: /run/secrets/token) path to the file with the Appveyor API token
  • $TOKEN: (default: none) the token to use (not recommended, use secrets instead)
  • $READ_ONLY: (default: false) set to true to prevent triggering a new build, and instead look for a build that matches the commit

Standalone usage

Using a branch and a revision:

docker run --rm -it -e TOKEN=<token> -e REPOSITORY=<namespace/name> -e BRANCH=<branch> -e REVISION=<hash> pipekit/appveyor

Automatically detecting the revision and repository names from a local project:

docker run --rm -it -e TOKEN=<token> -v $(pwd):/run/context pipekit/appveyor

This will use the origin remote as $REPOSITORY, and the current checked out revision for $REVISION.

Artifacts are automatically downloaded to /run/context/artifacts. In order to fetch them locally, add -v $(pwd):/run/context to the above command.

The $TOKEN can also be passed in as a secret, but you need to run the image as a service:

docker service create --restart-condition none --secret source=appveyor,target=token [...] pipekit/appveyor

Limitations

  • Does not work with external PRs (yet)
Docker Pull Command
Owner
pipekit

Comments (0)