Cloud Continuous integration--appveyor embrace GitHub

Source: Internet
Author: User

Thinking you're working on a website

Finally done, after submitting the code, you press the Build menu of the development environment, after a cup of coffee, build succeed, then connect to the server and start deploying

When you lezizi to enjoy the results of your development, suddenly found a bug! So you change the code again, build, deploy

Bugs found ... Modify ... build ... Deployment...

Bugs found ... Modify ... build ... Deployment...

...

No! That's enough, I'm so bored.

Continuous integration in the cloud

As shown, with the introduction of continuous integration, everything becomes convenient, and when the developer submits the new code to the source control server, the build of the continuous integration server is triggered, and after the build completes, the test is executed, and after the test passes, it can be manually or automatically deployed to the production environment, depending on the configuration.

It's all automatic, and for developers, it's easy to submit the code to the source control.

With the advent of SaaS, Appveyor has moved continuous integration to the cloud, and we don't need to set up our own CI servers, just register an account and then connect GitHub, BitBucket or TFS to Appveyor.

Integration of Appveyor with GitHub

This article takes GitHub as an example to introduce the integration of Appveyor and source code control server.

First you have to have a project on GitHub

Take an ASP for example, an MVC project with a unit test, log in to Appveyor and click "New Project"

Select the project and click "ADD" to associate the project with the Appveyor

Just click on "New Build" on the right to build.

Before the build, we can do some configuration

In "SETTINGS" There is a version number, which is unique, which is used to identify the build, but not the version number of the generated assembly, if you want it to be the version number of the assembly,

Under the page, turn this on.

In the Build tab we can set the build method, whether it is MSBuild, or script, and also the configuration (Debug, Release) and platform (x64, x86, any CPU)

It also allows him to build a Web Deploy package or NuGet package after the build succeeds.

Different operating system environments can be selected for different project build requirements

If you need a database or other software, you can also add

You can change the hosts file, too.

When everything is configured, we press build.

After two minutes of waiting in line, build officially starts

The status of build can be viewed in real time

After the build is complete, discover and run the unit test, oops ... Fail one.

We can see the results very intuitively in the Test tab. Okay, look, let's fix the bug.

There are also email notifications ...

When repaired Commit,appveyor will detect GitHub code changes and then automatically build and test

This test passed, because I checked the build Web deploy package, there will be a deployment packages, can be downloaded and then taken to deploy

Docking of Appveyor with production environment

If you want to download the deployment package and deploy it, what's the convenient thing to say?

We can deploy the program directly to the production environment via Appveyor, where we use azure Website (China = =) as an example

To the admin page of azure, download his publish settings, open with a text editor,

Then create a new deployment environment in Appveyor's environments

Fill in the Information publish setting

It is important to note that the fill in the server needs to be changed to this format

In this case, the Https://appveyordemo.scm.chinacloudsites.cn:443/msdeploy.axd?site=appveyordemo

Once you've created your environment, just click Deploy to select a build, and then you're ready.

Once the deployment is successful, we will be able to see our website.

More Appveyor features, waiting for friends to explore!

Cloud Continuous Integration--appveyor embrace GitHub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.