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

Separate Test & Deploy steps in Travis. #617

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dipakmdhrm
Copy link
Collaborator

@dipakmdhrm dipakmdhrm commented Jan 12, 2024

Context:

Sometimes during deployment, the build passes all tests but the deployment fails due to some issue in git, redis, etc. In such cases, to trigger the deployment, we need to re-run the whole test+deploy.

This will allow us to re-trigger deployment without re-running tests.

@dipakmdhrm dipakmdhrm changed the title Separate Test & Deploy steps. Separate Test & Deploy steps in Travis. Jan 12, 2024
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/prepare_deploy.sh) || travis_terminate 1;"
- "(travis_retry ddev robo deploy:tag-pantheon --no-interaction $TRAVIS_TAG master) || travis_terminate 1;"
- "ddev composer install || travis_terminate 1;"
- "(travis_retry ddev robo deploy:pantheon-sync) || travis_terminate 1;"
- stage: Deploy
name: 'Backend tests: Functional tests and deploy to Pantheon LIVE'
name: 'Backend tests: Deploy to Pantheon LIVE'
if: tag IS present AND type = "push" AND tag =~ /live$/
script:
- "$TRAVIS_BUILD_DIR/ci-scripts/check_live_deploy.sh || travis_terminate 1;"
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/install_ddev.sh) || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_drupal.sh || travis_terminate 1;"
Copy link
Collaborator

@bboro bboro Jan 12, 2024

Choose a reason for hiding this comment

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

Do we still need to install drupal if we're not running tests in this step*?

@AronNovak
Copy link
Member

It was an optimization idea to save time. Initializing the project takes time (downloading Docker images, etc).
I agree that in the bad case, it's the opposite effect, but anyways we need to execute tests for the sake of safety upon deploy, if we bundle it with deploy step, for the good scenario, we save time, I am not entirely convinced that we'd want this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants