Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

AppVeyor

Miodrag Milić edited this page Oct 22, 2016 · 55 revisions

You can make AU updater run on AppVeyor.

For this to work you must create account and then create the appveyor.yml file in the package repository root. AU provides an AppVeyor build template that you can use to quickly get started.

Follow the steps outlined here to set it all up:

  • Go to AppVeyor and sign up/sign in. https://ci.appveyor.com
  • Set up new AppVeyor project: https://ci.appveyor.com/projects/new
  • Go to project settings and ensure the following items are set (these items cannot be configured in the yaml):
    • In Build Schedule, set up the cron job - if we want to run this three times a day - set it like this: 5 */6 * * *. This ensures it runs at 06:05, 12:05, and 18:05. You can use crontab.guru for help with this.
    • Ensure Skip branches without appveyor.yml is checked.
    • Click Save.

This is enough to make AppVeyor run the build. However, if you want it to use all AU plugins you need to set few environment variables. Edit appveyor.yml environment and create secure variables. Go to encrypt tool and log in, then:

  • Get encrypted values for
    • Github password or api token (only if you use non anonymous Gist and/or Git plugins).
    • Email password (only if you use email for notifications).
    • Chocolatey API key (mandatory).
  • Edit the appveyor.yml to add those values in and also fill in all other non-secure variables.

Its advisable to disable build on push request as some plugins will fail due to the way AppVeyor handles secrets:

Secure variables are not decoded during Pull Request builds which prevents someone from submitting PR with malicious build script displaying those variables

Go to your Github repository settings - Repository Settings -> Webhooks - and edit the AppVeyor hook then uncheck Pull request.

Notes

  • If you don't want to always use the latest AU release you can specify the AU version in the appveyor.yml that you want to use.
  • You can force update of specific packages by sending specially crafted commit message: [AV pkg1 pkg2 ... ]. This will trigger update_all.ps1 -ForcedPackages 'pkg1 pkg2 ...' which will force update for given packages. Invalid package names are ignored. This works only if AV command is on the first commit line.

    SPECIAL NOTE: In order for this not to produce and push choco package with version set to fixed choco notation you need to set version to lower on given packages (0.0 for example).
Clone this wiki locally