Closed balmas closed 7 years ago
Ideally we would also have automated tests which can be used to verify a merged PR won't break anything, but current lack of these tests should not delay the CI implementation
Minimal build from scratch requires ruby 2.0 and bundler. See .travis.yml file.
Here's what ideally I'd like the Capistrano deploy task to do:
The capistrano rollback task should
For clarity, let's break this down into two pieces: build a release and deploy a release
To build a release we need to do the following:
POST /repos/:owner/:repo/releases
(See https://developer.github.com/v3/repos/releases/#create-a-release)We would like to manage the build on Jenkins.
To deploy a release we need to do the following:
There are two options: 1) deploy only the dist directory by coping its contents to the deployment location on the remote apache server 2) deploy the entire repository, and have the apache server configured to serve only the dist directory
In either scenario, we must:
In the case of this particular application, it makes very little difference to me which approach we take. The default behavior with Capistrano seems to be simply to deploy the entire repo. The latter approach simplifies the capistrano task in favor of a slighly more complicated apache config. The former approach is the reverse.
We would like the deploy task to be dependent upon the build task.
source repository https://github.com/alpheios-project/arethusa-configs
Rakefile
build
tasks compiles json files and places compiled versions indist
directory Rakefilerelease
task callsbuild
bumps version # in theVERSION
file and pushs everything to githubCurrent deployment process:
cd arethusa-configs
git checkout master
git pull
rvm use 2.0
rake release
. scp -i ~/.ssh/perseidskey.pem dist/<filename> deployer@www.perseids.org:/usr/local/arethusa-configs/dist