Closed martintoreilly closed 7 years ago
We are getting an authentication error on deployment:
fatal: Authentication failed for 'https://hut23-deploy:[secure]@science-gateway-inputs.scm.azurewebsites.net:443/science-gateway-inputs.git/'
We have verified that the username and password are the same on the Azure app service and Travis.
Problem solved!! passwords with special characters need to be escaped on Travis. Messaged shown in Travis:
Notice that the values are not escaped when your builds are executed. Special characters (for bash) should be escaped accordingly.
Ha!! and $
needs to be escaped with 3\
: \\\
- Now it works!!
Description
The front-end app has a build stage so we want to deploy the built artifacts to Azure and would prefer not to check these into our source repository. Options are:
master
brach so that Travis CI passes prior to merge intomaster
. We then have Azure Kudu pull from our source repo and build the app itself.Implementation
We have decided to deploy from Travis. It should be as simple as adding the following to
.travis.yml
with the following environmental variables set in Travis. This should get Travis to push the repo including the build output to the Azure local Git repo for the app service.Travis Yaml
Removing
.gitignore
before deploy and skipping cleanup ensures that thedist
build output directory is pushed to Azure.Deploy set to occur on all branches for testing but should be
master
only once successful. We should also look at having deployment slots for dev / staging / production, linked to different source branches in Travis.Travis environmental variables
AZURE_WA_SITE
set to subdomain of app onazurewebistes.net
(i.e.science-gateway-inputs
for us)AZURE_WA_USERNAME
set to Azure app service deployment username (used for FTP and local Git deployment)AZURE_WA_PASSWORD
set to Azure app service deployment password (used for FTP and local Git deployment)