Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Update app deployment job #4344

Closed
wants to merge 1 commit into from
Closed

Conversation

alexmuller
Copy link
Contributor

This change allows us to use Capistrano recipes which are in the app
repo (in public). This is good because it means more people can access
stuff and see how it works.

  • We need to wipe the workspace because we're making clones inside clones
    (it only takes about a minute longer)
  • For existing apps the process should be exactly the same
  • For apps that aren't defined in alphagov-deployment, this change will
    use the Capistrano recipe from the app repo
  • We have to remove the Gemfile so that it uses the bundler bundle from
    the main alphagov-deployment (not the app's bundle)

git clone "git@github.com:alphagov/${TARGET_APPLICATION}.git"
cd "$TARGET_APPLICATION/"
git checkout $TAG
rm -f Gemfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can specify the Gemfile to use with BUNDLE_GEMFILE

BUNDLE_GEMFILE=${WORKSPACE}/Gemfile bundle exec cap "$DEPLOY_TASK"

@boffbowsh
Copy link
Contributor

One small comment, otherwise 👍

else
echo "---> No deploy.sh found, running 'bundle exec cap \"${DEPLOY_TASK}\"'" >&2
exec bundle exec cap "$DEPLOY_TASK"
git clone "git@github.com:alphagov/${TARGET_APPLICATION}.git"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any non-alphagov apps we would want to use this approach with?

This change allows us to use Capistrano recipes which are in the app
repo (in public). This is good because it means more people can access
stuff and see how it works.

- We need to wipe the workspace because we're making clones inside clones
  (it only takes about a minute longer)
- For existing apps the process should be exactly the same
- For apps that aren't defined in alphagov-deployment, this change will
  use the Capistrano recipe from the app repo
@alexmuller alexmuller force-pushed the update-deploy-app-jenkins-job branch from 730dfe8 to 7a715bc Compare April 19, 2016 15:34
@alexmuller
Copy link
Contributor Author

Superceded by #4350 which we think is better!

@alexmuller alexmuller closed this Apr 20, 2016
@Davidslv Davidslv deleted the update-deploy-app-jenkins-job branch June 27, 2016 13:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants