Trigger builds in Appveyor from a container, downloading artifacts on successful build
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.
$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 commitUsing 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
Content type
Image
Digest
Size
5.1 MB
Last updated
about 9 years ago
docker pull pipekit/appveyor