Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to fetch appveyor.yml directly over HTTP/HTTPS without using git #1089

Closed
IlyaFinkelshteyn opened this issue Oct 3, 2016 · 10 comments
Assignees
Milestone

Comments

@IlyaFinkelshteyn
Copy link
Contributor

Discussion: #545 (comment)

@IlyaFinkelshteyn IlyaFinkelshteyn self-assigned this Oct 3, 2016
@IlyaFinkelshteyn IlyaFinkelshteyn added this to the 6-nov-2016 milestone Nov 11, 2016
@FeodorFitsner FeodorFitsner modified the milestones: 20-nov-2016, 27-nov-2016 Nov 17, 2016
@UbaidBashir
Copy link

Kindly update.

@IlyaFinkelshteyn
Copy link
Contributor Author

Should be in production in 1-2 days.

@kevinoid
Copy link

That's great news. Thanks @IlyaFinkelshteyn!

@UbaidBashir
Copy link

Great to hear that @IlyaFinkelshteyn . Please provide us with documentation once done. Thank you

@imdadahad
Copy link

Is this ready?

@FeodorFitsner
Copy link
Member

Yes

@imdadahad
Copy link

Great, are there any docs?

@IlyaFinkelshteyn
Copy link
Contributor Author

Docs are getting ready. For now can you please follow this and let us know if it works?

Publish your YAML file as a plain text (Content-Type: text/plain) and anonymously accessible at some HTTP (or HTTPS) location. For example, like this https://ilyaftp.azurewebsites.net/yaml/appveyor.txt.
After that in AppVeyor project UI Settings > General, set your file full URL in Custom configuration .yml file name field as on the screenshot and you are good to go.
appveyor-txt-http

Needless to say, you need to use secure variables for secrets here :)

Please note that I cannot guarantee this sample link https://ilyaftp.azurewebsites.net/yaml/appveyor.txt to be alive over time, but for now you can just use it for experiment.

--ilya.

@espoelstra
Copy link

This is fantastic Ilya!!! I just came across this while reading a number of the support tickets trying to figure out why it wasn't detecting my appveyor.yml from a generic Git repo (actually a Gist) and you have the perfect solution. You could try hosting your appveyor.yml via GitHub's Gist site as you can use the "raw" link to do exactly the same thing you are doing above and it will probably be available for as long as this issue is searchable (ie until GitHub dies).

One thing to note is that when you grab a raw link for a Gist file using the GitHub UI it contains the revision information in the URL so if you are changing it frequently you will need to update your appveyor.yml URL as well. The workaround for this is to use the information in this Gist (or the one it is forked from) to format the URL as a proper "permalink". https://gist.github.com/dragon788/dadcc5d1d1258b5d0d56

I've actually tested this with a few of my Gists as generic Git repos and it is working perfectly, pulling the appveyor.yml specified and running the job with the appropriate configuration. I also tested using a single "central" appveyor.yml and referencing that for other Gists that don't contain one, and it works quite well. This might be an unintentional feature but an excellent one for how I've been testing some things recently that need a common config, but I didn't want to check in the same appveyor.yml over and over.

This also works for BitBucket snippets (both hosting the appveyor.yml and building them).

I did notice it seems to take an extra second to save the first time I put in an https://****/appveyor.yml, does it pull it immediately or just every time Build is clicked?

The best part is your mention of using secure variables, if I understand correctly even if somebody else got a link to your appveyor.yml, they couldn't extract the secrets because they are tied to some portion of your AppVeyor account that wouldn't be accessible to others.

@IlyaFinkelshteyn
Copy link
Contributor Author

Thanks a lot for good words :) Extra second to save the first time you put in an URL probably connected to persisting configuration change to the backend database. File itself is being read on-demand every time new build started.

--ilya.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants