-
Notifications
You must be signed in to change notification settings - Fork 0
How to login
To run any command, user can enter the options -t, --token with the appveyor token and the option -a,--account with appveyor account
appvey use a new user-level API key (v2) that allows working with any account user has access to.
Token can be generated from ci.appveyor.com after login to appveyor account.
appvey project list -t 1yqFlMe3hmqe9aADccIsjXM12 -a myaccountOR
appvey project list --token 1yqFlMe3hmqe9aADccIsjXM12 --account myaccount1- Auto login
If user prefer to auto login without entering token and account every time, create the next environment variables:
APPVEYOR_TOKEN: to store appveyor token
APPVEYOR_ACCOUNT: to store appveyor account
Using this method, User need not to enter the token for any command. This help in auto login.
2- Store token in a file on disk. Use the option: --token @path/to/my_token.txt , if the token is stored in a file named my_token.txt
appvey project list --token @path/to/my_token.tx --account myaccount
3- Create a response file that contains both account and token, eg my_account.rsp
The contents of my_account.rsp:
--account account1
--token v2.ob3tc6eiymui45flie5q
To use the response file:
appvey project history --slug cloudbuilder @path/to/my_account.rsp
Create response file proxy.rsp for token and proxy:
--account account1
--token v2.ob3tc6eiymui45flie5q
--proxy-address http://proxy.server:8888
--proxy-user user1:password1
To use the response file:
appvey project history --slug cloudbuilder @path/to/proxy.rsp
Note:
Using response file to store account/token option is efficient especially if there are more account.
Create a response file per account eg, accoun1.rsp and account2.rsp
Any option can be commented by prefixing it with
#and passing it in the terminal.
4- Use dash symbol - as a value for the token to enter the token from the keyboard or paste it.
The token is hidden and it is displayed as star *
appvey --token - --account myaccount
The message "Enter token:" is displayed to enter token. you can use backspace to remove the last char(s).
Enter token:***************
- use pipe input
if user can get the token from an application that store and retrieve secured passwords and dump the token in console, use dash - as a value.
Secure store tokens in encrypted form. It retrieve token by its label and pipe the token to appvey by symbol | :
secure get -s secrets.json appveyor -p Pa$$w0rd | appvey project list -t -
- If the token is stored in environment variable
APPVEYOR_TOKEN, user need not to enter the token for any command. This help in auto login.
Note:
All examples are using the auto login method.
- Run the command:
configto create environment variables which enables user to auto login each time to run any command.
appvey config -t 1yqFlMe3hmqe9aADccIsjXM12 --account my_account
The environment variables are stored in the user profile.
- In windows
edit the system environment variables->user profiles and create the variables.
Or, by running the command from cmd terminal:
setx APPVEYOR_TOKEN "my-token"
setx APPVEYOR_ACCOUNT "my-account"- In Linux
If you are using bash, ash, ksh or some other Bourne-style shell, you can add:
APPVEYOR_TOKEN="v2.1yqFlMe3hmqe9aADccIsjXM12"; export APPVEYOR_TOKEN
APPVEYOR_ACCOUNT="v2.1yqFlMe3hmqe9aADccIsjXM12"; export APPVEYOR_ACCOUNTin your .profile file (${HOME}/.profile). This is the default situation on most Unix installations.
- <build start recent> : Start build of branch most recent commit:
- <build start commit> : Start build of specific branch commit:
- <build rerun> :Re-run build
- Start build of Pull Request: <build start pr>
- <build cancel> : Cancel build
- <build delete> : Delete build
- <project list> : Get projects
- <project last-build> : Get project last build
- <project last-build> : Get project last branch build
- <project build-version> : Get project build by version
- <project history> : Get project history
- <project deploy> : Get project deployments
- <project setting> : Get project settings
- <project yaml> : Get project settings in YAML
- <project env> : Get project environment variables
- <project add> : Add project
- <project update slug> : Update project
- <project update yaml> : Update project settings in YAM
- <project update env> : Update project environment variables
- <project update build-number> : Update project build number
- <project delete-cache> : Delete project build cache
- <project delete> : Delete project