Skip to content

koetsier/govuk-app-deployment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

762 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GOV.UK application deployment scripts

Capistrano deployment scripts for applications running on GOV.UK.

Adding a new app

Create a new directory for your app based on one of the other apps e.g.

# Capfile

load 'deploy'

$:.unshift(File.expand_path('../../lib', __FILE__))
load_paths << File.expand_path('../../recipes', __FILE__)

load 'config/deploy'
# config/deploy.rb

set :application, "myapp"
set :capfile_dir, File.expand_path('../', File.dirname(__FILE__))
set :server_class, "myserverclass"
set :repository, "git@github.com/alphagov/myapp.git"

load 'defaults'
load 'ruby'
load 'deploy/assets'

set :copy_exclude, [
  '.git/*'
]

How deployments work

The master jenkins.sh script is run by Jenkins to deploy each app.

Environment variables available to deploy scripts

There are a number of environment variables set in Jenkins that can be used in deploy scripts:

  • DEPLOY_TO - the environment being deployed to
  • DEPLOY_TASK - the deploy task selected in the Jenkins interface ("deploy", "deploy:setup", etc)
  • TAG - the tag/branch entered in the Jenkins interface ("release", "release_1234", "build-1234", etc)
  • ORGANISATION - The vCloud organisation being deployed to
  • CI_DEPLOY_JENKINS_API_KEY - API key used to fetch build artefacts from ci.dev.publishing.service.gov.uk.

About

GOV.UK's application deployment code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 99.4%
  • Shell 0.6%