< Back
Connect-AppVeyorToGCE
Post
NAME Connect-AppVeyorToGCE
SYNOPSIS
Command to enable GCE builds. Works with both hosted AppVeyor and AppVeyor Server.
SYNTAX
Connect-AppVeyorToGCE [-AppVeyorUrl] <String> [-ApiToken] <String> [-SkipDisclaimer] [-UseCurrentGcloudConfig]
[[-Zone] <String>] [[-VmSize] <String>] [[-ImageId] <String>] [[-CommonPrefix] <String>] [[-ImageOs] <String>]
[[-ImageName] <String>] [[-ImageTemplate] <String>] [[-ImageFeatures] <String>] [[-ImageCustomScript] <String>]
[[-ImageCustomScriptAfterReboot] <String>] [<CommonParameters>]
DESCRIPTION
You can connect your AppVeyor account (on both hosted AppVeyor and on-premise AppVeyor Server) to your own GCE
account for AppVeyor to instantiate build VMs in it. There are several benefits like having the ability to
customize your build image, select desired VM size, set custom build timeout and many others. To simplify the
setup process for you, command provisions necessary GCE and GCS resources, runs Hashicorp Packer to create a basic
build image, and puts all the AppVeyor configuration together. After running this command, you should be able to
start builds on GCE immediately (and optionally customize your GCE build environment later).
PARAMETERS
-AppVeyorUrl <String>
AppVeyor URL. For hosted AppVeyor it is https://ci.appveyor.com. For Appveyor Server users it is URL of
on-premise AppVeyor Server installation
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
API key for specific account (not 'All accounts'). Hosted AppVeyor users can find it at
https://ci.appveyor.com/api-keys. Appveyor Server users can find it at <appveyor_server_url>/api-keys.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SkipDisclaimer [<SwitchParameter>]
Skip warning related to GCE resources creation and potential charges. It is recommended to read the warning at
least once, but it can come in handy if you need to re-run the command.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-UseCurrentGcloudConfig [<SwitchParameter>]
Use current active Google cloud config, so command will use current Google account and create resources in the
Google Cloud project set in the current config.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Zone <String>
Google cloud zone, e.g. 'us-east1-b'
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-VmSize <String>
Type of GCE machine, e.g. 'n1-standard-1'
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageId <String>
It may be that having run the command and created a valid VM image, some AppVeyor settings are not set
correctly (or you may just want to change them without doing it in the AppVeyor build environments UI). In
this case you want to skip the most time consuming step (creating an image with Packer) and pass the existing
image ID to this parameter.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CommonPrefix <String>
Command will prepend all created GCE resources names with it. Due to storage account names restrictions, it
must contain only letters and numbers and be shorter than 16 symbols. Default value is 'appveyor'.
Required? false
Position? 6
Default value appveyor
Accept pipeline input? false
Accept wildcard characters? false
-ImageOs <String>
Operating system of build VM image. Valid values: 'Windows', 'Linux'. Default value is 'Windows'.
Required? false
Position? 7
Default value Windows
Accept pipeline input? false
Accept wildcard characters? false
-ImageName <String>
Description to be passed to Packer and name to be used for AppVeyor image. Default value generated is based
on the value of 'ImageOs' parameter.
Required? false
Position? 8
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageTemplate <String>
If you are familiar with Hashicorp Packer, you can replace template used by this command with another one.
Default value generated is based on the value of 'ImageOs' parameter.
Required? false
Position? 9
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageFeatures <String>
Comma-separated list of feature IDs to be installed on the image. Available IDs can be found at
https://github.com/appveyor/build-image ... adata.json under
'installedFeatures'.
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageCustomScript <String>
Base-64 encoded text of custom sript to execute during image creation. It should not contain reboot
instructions.
Required? false
Position? 11
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageCustomScriptAfterReboot <String>
Base-64 encoded text of custom sript to execute during image creation, after reboot. It is usefull for cases
when custom software being installed with 'ImageCustomScript' required some additional action after computer
restarted.
Required? false
Position? 12
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-AppVeyorToGCE
Let command collect all required information
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-AppVeyorToGCE -AppVeyorUrl https://ci.appveyor.com -ApiToken XXXXXXXXXXXXXXXXXXXXX -SkipDisclaimer
-Zone us-east1-b -VmSize n1-standard-1
Command will create resources us-east1-b zone, and will connect it to hosted AppVeyor. Machine type n1-standard-1
will be used for both Packer and AppVeyor builds.
RELATED LINKS
SYNOPSIS
Command to enable GCE builds. Works with both hosted AppVeyor and AppVeyor Server.
SYNTAX
Connect-AppVeyorToGCE [-AppVeyorUrl] <String> [-ApiToken] <String> [-SkipDisclaimer] [-UseCurrentGcloudConfig]
[[-Zone] <String>] [[-VmSize] <String>] [[-ImageId] <String>] [[-CommonPrefix] <String>] [[-ImageOs] <String>]
[[-ImageName] <String>] [[-ImageTemplate] <String>] [[-ImageFeatures] <String>] [[-ImageCustomScript] <String>]
[[-ImageCustomScriptAfterReboot] <String>] [<CommonParameters>]
DESCRIPTION
You can connect your AppVeyor account (on both hosted AppVeyor and on-premise AppVeyor Server) to your own GCE
account for AppVeyor to instantiate build VMs in it. There are several benefits like having the ability to
customize your build image, select desired VM size, set custom build timeout and many others. To simplify the
setup process for you, command provisions necessary GCE and GCS resources, runs Hashicorp Packer to create a basic
build image, and puts all the AppVeyor configuration together. After running this command, you should be able to
start builds on GCE immediately (and optionally customize your GCE build environment later).
PARAMETERS
-AppVeyorUrl <String>
AppVeyor URL. For hosted AppVeyor it is https://ci.appveyor.com. For Appveyor Server users it is URL of
on-premise AppVeyor Server installation
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
API key for specific account (not 'All accounts'). Hosted AppVeyor users can find it at
https://ci.appveyor.com/api-keys. Appveyor Server users can find it at <appveyor_server_url>/api-keys.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SkipDisclaimer [<SwitchParameter>]
Skip warning related to GCE resources creation and potential charges. It is recommended to read the warning at
least once, but it can come in handy if you need to re-run the command.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-UseCurrentGcloudConfig [<SwitchParameter>]
Use current active Google cloud config, so command will use current Google account and create resources in the
Google Cloud project set in the current config.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Zone <String>
Google cloud zone, e.g. 'us-east1-b'
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-VmSize <String>
Type of GCE machine, e.g. 'n1-standard-1'
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageId <String>
It may be that having run the command and created a valid VM image, some AppVeyor settings are not set
correctly (or you may just want to change them without doing it in the AppVeyor build environments UI). In
this case you want to skip the most time consuming step (creating an image with Packer) and pass the existing
image ID to this parameter.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CommonPrefix <String>
Command will prepend all created GCE resources names with it. Due to storage account names restrictions, it
must contain only letters and numbers and be shorter than 16 symbols. Default value is 'appveyor'.
Required? false
Position? 6
Default value appveyor
Accept pipeline input? false
Accept wildcard characters? false
-ImageOs <String>
Operating system of build VM image. Valid values: 'Windows', 'Linux'. Default value is 'Windows'.
Required? false
Position? 7
Default value Windows
Accept pipeline input? false
Accept wildcard characters? false
-ImageName <String>
Description to be passed to Packer and name to be used for AppVeyor image. Default value generated is based
on the value of 'ImageOs' parameter.
Required? false
Position? 8
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageTemplate <String>
If you are familiar with Hashicorp Packer, you can replace template used by this command with another one.
Default value generated is based on the value of 'ImageOs' parameter.
Required? false
Position? 9
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageFeatures <String>
Comma-separated list of feature IDs to be installed on the image. Available IDs can be found at
https://github.com/appveyor/build-image ... adata.json under
'installedFeatures'.
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageCustomScript <String>
Base-64 encoded text of custom sript to execute during image creation. It should not contain reboot
instructions.
Required? false
Position? 11
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ImageCustomScriptAfterReboot <String>
Base-64 encoded text of custom sript to execute during image creation, after reboot. It is usefull for cases
when custom software being installed with 'ImageCustomScript' required some additional action after computer
restarted.
Required? false
Position? 12
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-AppVeyorToGCE
Let command collect all required information
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-AppVeyorToGCE -AppVeyorUrl https://ci.appveyor.com -ApiToken XXXXXXXXXXXXXXXXXXXXX -SkipDisclaimer
-Zone us-east1-b -VmSize n1-standard-1
Command will create resources us-east1-b zone, and will connect it to hosted AppVeyor. Machine type n1-standard-1
will be used for both Packer and AppVeyor builds.
RELATED LINKS