I need to set up continuous deployment of a WordPress theme that is source controlled on bit-bucket.
An external agency is managing the theme development.
The WordPress install is hosted on the Windows Azure platform.
I can set up continuous deployment from a number of git services, including bit-bucket, but Azure wants to set the deployment from site root, where I need to the deployment on at the themes folder level.
How do I achieve this?
Thanks
It turns out all that is required is a .deployment file in the root of the repository
[config]
DEPLOYMENT_TARGET = D:\home\site\wwwroot\path\to\theme
Related
I am currently hosting a website using an azure app service (wordpress) and I want to setup a pipeline that basically pushes a build artifact from my github repo to the themes directory and syncs it with the current one. Is this even possible? Any point in the right direction is massively helpful. Thank you.
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 have configured my Azure website to deploy from a Bitbucket Mercurial repository. I only have one branch. From the logs (see below), it looks like the deployment process uses the Release configuration.
...
MyProject.Web ->
D:\home\site\repository\MyProject.Web\bin\MyProject.Web.dll
Transformed Web.config using
D:\home\site\repository\MyProject.Web\Web.Release.config
into obj\Release\TransformWebConfig\transformed\Web.config.
...
Let's say I have three environments, DEV, BETA, and PROD. I have web.config transformations for each since they may have different connection strings or various other different settings across each environment. How can I specify a different configuration?
You can create a .deployment file in the root of your repo and put this in it
[config]
SCM_BUILD_ARGS=-p:Configuration=Debug
Alternatively you can specify that in the site's App Settings from portal. like this:
SCM_BUILD_ARGS=-p:Configuration=Debug
For more about custom deployment settings you can refer to this
We are small wordpress focused web development company planning to migrate to OpenShift by RedHat.
My goal is to have production environments (apps) in the cloud and most of the development is done in local laptops using OpenShift origin and then deployed as staging apps to private OpenShift installation and when approved back to cloud replacing original app. It would be extra if all team could be able to edit app simultaneously in the dev version of the app (in the cloud).
The problem I noticed is that web development often requires many edits when tweaking CSS and such and commits to OpenShift takes more than 10 seconds.
Hot deploy (https://www.openshift.com/kb/kb-e1057-how-can-i-deploy-my-application-without-having-to-restart-it) speeds up process a bit, but not enough.
Another option is to SCP/SFTP to local OpenShift installation and edit files bypassing git and build process. That causes git to be off sync, but it can be fixed (http://druss.pp.ua/2013/11/synchronize-openshift-application-after-update/)
How ever, process isn't that smooth as i hoped it to be. Any improvement ideas?
I prefer to keep my plugins & themes in git. That allows me to run a copy of my wordpress site locally for development, then add my changes into git, do a git push, and have the production site updated. This would require a minimal change to your files you have now if you used the OpenShift quickstart. I can provide details if needed.
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/