Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DT-587: Fixes #3564: Simulate deploys on TravisCI. #3927

Merged
merged 3 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/blt/deploy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ local.blt.yml
# Ignore build artifacts.
/tmp/
/reports/
/travis_wait*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Travis sometimes generates this log file during tests. It will prevent deploys unless specifically excluded from Git. Plus, no one actually wants to deploy this file.


# Node.js package manager.
npm-debug.log
Expand Down
1 change: 1 addition & 0 deletions scripts/travis/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ script:
# Uncomment these lines to test database updates using live content.
# - blt drupal:sync:default:site
- source ${BLT_DIR}/scripts/travis/run_tests
- source ${BLT_DIR}/scripts/travis/simulate_deploy

deploy:
- provider: script
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis/deploy_branch
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -ev

blt artifact:deploy --commit-msg "Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" --branch "${TRAVIS_BRANCH}-build" --ignore-dirty --no-interaction --verbose
blt artifact:deploy --commit-msg "Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" --branch "${TRAVIS_BRANCH}-build" --no-interaction --verbose

set +v
2 changes: 1 addition & 1 deletion scripts/travis/deploy_tag
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -ev

blt artifact:deploy --commit-msg "Automated commit by Travis CI for Build ${TRAVIS_TAG}" --tag "${TRAVIS_TAG}-build" --ignore-dirty --no-interaction --verbose
blt artifact:deploy --commit-msg "Automated commit by Travis CI for Build ${TRAVIS_TAG}" --tag "${TRAVIS_TAG}-build" --no-interaction --verbose

set +v
7 changes: 7 additions & 0 deletions scripts/travis/simulate_deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -ev

blt artifact:deploy --dry-run --commit-msg "Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" --no-interaction --verbose

set +v
2 changes: 1 addition & 1 deletion src/Robo/Commands/Artifact/DeployCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function checkDirty(array $options = ['ignore-dirty' => FALSE]) {
->interactive(FALSE)
->run();
}
throw new BltException("There are uncommitted changes, commit or stash these changes before deploying.");
throw new BltException("There are uncommitted changes on the source repository (listed above). Commit, stash, or remove these changes before deploying, or use the --ignore-dirty flag. Additional guidance is available at https://support.acquia.com/hc/en-us/articles/360035204013-Dirty-BLT-source-directory-prevents-deploys.");
}
}
}
Expand Down
1 change: 1 addition & 0 deletions subtree-splits/blt-project/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ deployment_identifier
bin/*
tmp
reports
/travis_wait*

# OS X
.DS_Store
Expand Down