Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Dropcat - the Jenkins build

Parent Feed: 

Jenkins setup

We are using jenkins to clone the project, and the only task we do after that is executing a shell, like this:

Jenkins execute shell

In the end of this series I am doing a post about our composer workflow, so I will not go into that now.

First we export some variables, to use with dropcat later.

PATH

Local path to composer

DROPCAT_ENV

Which environment we are going to deploy, in this case stage, so dropcat will use the dropcat.stage.yml file for settings.

ENV

This is a variable we are using for composer.

BUILD_DATE

Used to name our deployed folder.

And then the dropcat tasks

dropcat prepare

This command checks if the db used for the site exists, if it does not, it tries to create it. It also creates the drush-alias used for the site etc.

dropcat backup

This backups the db, if you want to backup the whole web folder, add the option -- backup_site 

dropcat tar

Packs the site in a tar-file. The options here could be set in dropcat.stage.yml, but I think it is more useful to use Jenkins variables here.

dropcat upload

Uploads the tar to the remote server, and removes it from the local server.

dropcat move

This unpacks the tar file and moves it in place. And creates a symlink to the deployed folder, like mysite_latest_stage. It also deletes the uploaded tar-file.

dropcat symlink

This we are using to create the files folder, which in our setup is outside the web folder.

dropcat config-import

Imports the configuration.

dropcat reset-login

Gets us a login-link to the site so we could check our deploy.

In next blogpost we are starting to look into in detail what happens in each step.

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web