I pushed my .net project files to bitbucket and then bridge in appharbor site to the project on bitbucket. But it doesn't build after all as it used to. Is there anything that I missed?
Now I could make build it.
There is a sequence for the build process. First start a repo on bitbucket, and create an application on appharbor then push the project to the bitbucket repository. When you get back you will see your commit on bitbucket. Then click the deploy button over there.
It didn't use to need to push after bridging before.
Related
Can Visual Studio be configured to Publish (deploy) and Push (to GIT) simultaneously?
I have Visual Studio configured to "Publish" "only files needed to run this application" to a folder on a remote server which IIS is pointing to. When I make local changes, I can publish remotely easily.
I've also configured GIT for the project. The publish information is in the repo so that anyone can pull the project, make changes, and Publish. My general practice is to Pull, work, Push to GIT, then Publish the site--all using VS.
What is the best way to synchronize these actions? I don't want anyone to publish the app and forget to push to GIT at the same time.
I've worked with dev/production servers using typical web layouts before (i.e. push to git repo that IS the location of production files), but in this case that doesn't work because of the minimalist file structure of a "Published" site. I'd have to coordinate the exclude files in GIT with the files "not used" for publishing.
Visual Studio 2017, IIS 10.0
EDIT:
The GIT server as well as the project are hosted internally (albeit on different servers). Storing the code locally is a requirement, I cannot upload to TFS (so, so unfortunately).
Your requirement can be achieved in TFS/VSTS easily.
First, TFS/VSTS supports GIT version control, you can use it version control your project. You can refer to the following link for more details:
https://learn.microsoft.com/en-us/vsts/git/gitquickstart?view=vsts&tabs=visual-studio
Also, TFS/VSTS supports continuous integration and continuous deployment. A continuous integration trigger on a build definition indicates that the system should automatically queue a new build whenever a code change is committed. You can make the trigger more general or more specific, and also schedule your build (for example, on a nightly basis). You could also enable the Continuous deployment trigger, which will create release every time a new build is available.
https://learn.microsoft.com/en-us/vsts/build-release/actions/ci-cd-part-1?view=vsts
I'm doing a web site deployment in azure with bit bucket source.
When I do the deployments I can see always its building the source,
Actually that is not required to me, because it is a Kentico 10 web site (.Net website project).
How do i avoid building while source deployment/ pull the latest from bitbuckt ?
You should stop using continuous integration process in bitbucket and hook your own process to do a xcopy (preferably delta) to target website folder.
Using the OOB tools it is not possible to deploy without a build. So you can do a few things:
FTP
Visual Studio publish
command line copy after a successful build locally.
Another setup could reduce the number of builds you have when deploying but will still build the solution, more branches in Bitbucket.
You could continue to use CI but make sure you hook your environments to proper branches so they only deploy when you perform a merge into that branch.
How do i avoid building while source deployment/ pull the latest from bitbuckt ?
You could check the deployment details under "DEPLOYMENT > Deployment options" as follows:
And you could leverage KUDU and check the auto-generated deploy.cmd file under D:\home\site\deployments\tools\deploy.cmd.
For your requirement, I would recommend you customize your deploy.cmd file, and put .deployment and deploy.cmd files into your Bitbucket repository. For a simple way, you could just download your current deployment script and modify the scripts under the Deployment section, you need to remove the script for building your solution and just leave the script for kudu sync, and you need to modify the value for the -f option from "%DEPLOYMENT_TEMP%" to "%DEPLOYMENT_SOURCE%" when invoking the %KUDU_SYNC_COMMAND%. Details you could follow Custom Deployment Script.
If you want to deploy the full content of your repo with no build or transformation at all, just set SCM_SCRIPT_GENERATOR_ARGS=--basic in the Azure App Settings. This will force the script generator to treat is as a 'basic' site, and won't do any build.
See wiki for more info.
I want to figure out how to integrate TeamCity builds with Springloops deployments.
Lets say I have a Git repo called api that has two branches dev and dev.build
api
|-- dev
|-- dev.build
I have set up TeamCity with a VCS trigger on dev to build upon commit. Which then creates artifacts that I want to use to deploy. (In this case it's an ASP.NET website with various DLLs that I want to use for deployment).
I also have Springloops that I use right now for deployments. Ideally I would like to deploy from dev.build. Is there a way to commit build artifacts from TeamCity to the dev.build branch, and then deploy from that branch?
The basic workflow would be
Commit code to dev
TeamCity merges dev into dev.build
TeamCity builds from dev.build
TeamCity commits artifacts (DLLs) to dev.build
Springloops auto deploys from dev.build
I have read arguments against storing build binaries/artifacts in git, but right now I do my deployments from Springloops, and ideally I could keep that setup. I know you can call git as a command line build step, but I'm having trouble putting all the pieces together. Especially how to merge from dev to dev.build as a TeamCity build step and then use dev.build to build from.
Is this possible at all? Am I thinking about this completely wrong? Do I have other options?
Edit/Update
I've found that it will be smarter to switch to using WebDeploy to deploy TeamCity artifacts (WebDeploy package) instead of committing build artifacts from a git repository via Springloops. I will hopefully stop using Springloops for deployments and deploy directly to my IIS sites via WebDeploy through a TeamCity build task. This way build artifacts (\bin folder) will stay out of git, and web.config transforms can also be used instead of manually making web.config edits on production IIS sites.
The other option I would recommend is to build a TeamCity Artifact, which is there to store the result of your job in an integrated lightweight builds artifact repository.
That way, Springloops could look for artifacts to deploy directly on a TeamCity url (or on a TeamCity agent).
That would scale better than trying to put those artifacts in a source code repo like Git, which isn't made for that.
Regarding the TeamCity build itself, it could be compose of two jobs (one dependent on the other) with the first one using the automatic merge feature, in order to merge dev to dev.build.
Yep, this is totally doable in TeamCity. In fact Jetbrains covers a lot of this in a blog post here.
I see in Azure that I can add a Git Repository to Azure and it automatically do deployments from it.
I tested successfully with an old project that has only Classic ASP. I think its very cool with a JavaScript only site too. These type of projects are not compiled. Just upload the changed files to the server and we are ready.
But how to do it with a .Net project where I generate compiled files? I need to create another repository for the Production files? or a branch or how is the "best practice" here?
You have two options.
1-Host your code on github, and allow github to publish new version to your azure websites.
http://www.youtube.com/watch?v=5NGieL0tinw
2-Use local git repository and push to azure manually.
http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-git/
I'm able to set up a connection in project A between two local folders, from project A to project B.
Manual upload/download is then possible using the contextual menu in project A.
But how about automatic sync between the two locations?
I see this possible for protocols such as FTP, but not when the target is a local directory.
Is this a missing feature, or is there a trick?
Edit: the answer/comments below explain that in fact Aptana sync feature is not a full sync logic but rather an 'upload when saving' feature that only gets triggered upon saving a file in eclipse. I would advise Apatana to rename it accordingly because it can be confusing. With this new understanding the answer below makes more sense.
For more background info here's my setup for one web site:
A) Several development projects: one core PHP framework project (drupal) which links (as in eclipse linked folders) to several module projects. Core and module projects are separate eclipse projects with their own git repo cloned from upstream repos on drupal.org. This way upgrading a module can be done independently from other modules and from core.
B) One development server project: contain the files to be deployed on the development web server. Needs to be a copy of the core project mentioned above in A), except that modules which are linked folders in core source project but need to become plain files copies in this project. This project has its own git repository different from the above repositories, and serves the purpose of snapshoting the whole web site.
C) One production server project: contain the files to be deployed on the live web server. Uses a separate branch in a clone of the development server repo from B)
I was hoping Aptana Studio could automate the sync between A to B.
Manual operations work fine, linked resources are copied from A to B.
However I'd like this process to be automatic, i.e. when files change in project A, they're automatically copied to project B.
There is a workaround, using a FTP server as a bridge:
Set up a connection from Project A to a FTP server (http://wiki.appcelerator.org/display/tis/FTP%2C+SFTP%2C+and+FTPS+Deployment) and make sure "Automatically sync my changes with the remote site" is selected;
Set up a connection from Project A to Project B using the right-click menu Deploy > Connections > Add New Connection;
Right-click on Project A and select Properties > File Transfer, then in the Connection combo box, select Project B and check "User the connection as default".
Now when you save a file modification in Project A, it should get automatically uploaded to Project B.
Hope this helps.