NAME

setup-appveyor-yml.pl - Tool for managing appveyor.yml files

VERSION

version 0.19

DESCRIPTION

This script updates existing appveyor.yml files with various settings from the command line. Currently all this does is update the notifications block for Slack and email notifications. It also reorders the top-level keys in the YAML file and does some other minor cleanups.

GETTING STARTED

You can create a new file for a Perl build from scratch by running this script with the --create argument:

$> setup-appveyor-yml.pl --dir . --create

If you want to update one or more existing files, don't pass --create.

If you want email or slack notification you'll need to pass a few more arguments:

$> setup-appveyor-yml.pl \
       --encrypted-slack-key o8PZMLqZK6uWVxyyTzZf4qdY \
       --email-address example@example.org

THE CONFIG

If there is an existing file, most of its config will be preserved. The existing config is used as the guide for some decisions about what to update, as detailed below. A newly created file will also follow this guide.

Here's a step-by-step guide to the generated Travis config and what it does:

skip_tags

This will be set to true for newly created files.

cache

This will be set to C:\strawberry for newly created files.

install

For new files this will contain the following commands:

- if not exist "C:\strawberry" cinst strawberryperl -y
- set PATH=C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH%
- cd C:\projects\%APPVEYOR_PROJECT_NAME%
- cpanm --installdeps . -n

build_script

This will contain one command, perl -e 1, for newly created files.

test_script

This will contain one command, prove -lrv t/, for newly created files.

notifications

If you pass an --email-address or --slack-key command line argument, then this block will be updated. For email, notifications will be sent on all failures and on status changes.

If you pass an encrypted slack key then notifications will be delivered via Slack on all failures and on status changes.

__app_cisetup__ comment

This saves any flags you pass on the command line. Future runs of this script will use these flags. However, CLI flags will always take precedence over these.

ARGUMENTS

This script accepts the following command line arguments:

--create

Create a new file instead of updating existing ones.

--dir

The directory under which to look for appveyor.yml files. This does a recursive search so you can update many projects at once. In create mode it will only create a file in the current directory.

This is required.

--encrypted-slack-key

A Slack key to use for Slack notifications. If you pass this you must also pass --slack-channel.

You can generate an encrypted key from the AppVeyor website.

--slack-channel

The Slack channel to notify. If you pass this you must also pass --encrypted-slack-key.

--email-address

The email address to which notifications should be sent. This is optional, and if you don't provide it, then no notification emails will be configured (but the default AppVeyor notifications will still be in place).

SUPPORT

Bugs may be submitted through https://github.com/maxmind/App-CISetup/issues.

AUTHORS

  • Mark Fowler <mark@twoshortplanks.com>

  • Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2019 by MaxMind, Inc.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)