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

VACMS-3904 Remove deploy steps from tests.yml & change order of deploy steps to match drush deploy #4378

Conversation

ElijahLynn
Copy link
Contributor

@ElijahLynn ElijahLynn commented Feb 20, 2021

Description

  1. The deploy steps in tests.yml was only for DevShop to run things because we were using it outside its expected behavior. DevShop is gone now and we don't need these anymore.

  2. The deploy steps order is changed to match the drush deploy recommendations. See https://www.drush.org/latest/deploycommand/

  3. The composer install autoloader options are removed from Tugboat as we have them in composer.json config section.

#3904

Deploy steps changes are also in BRD here > https://github.com/department-of-veterans-affairs/devops/pull/8557

Testing done

  • Tested locally on Lando
  • Tested on Tugboat, this PR - passed
  • Testing on BRD now, build works and doing a DEV deploy now and then tests should run and pass too

This was only for DevShop to run things, DevShop is gone now and we don't need these anymore.
@ElijahLynn ElijahLynn added the DevOps CMS team practice area label Feb 20, 2021
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 20, 2021 00:53 Destroyed
indytechcook
indytechcook previously approved these changes Feb 22, 2021
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 22, 2021 18:31 Destroyed
@ElijahLynn ElijahLynn requested a review from a team February 22, 2021 20:02
# Follows `drush deploy` sequence recommendations - https://www.drush.org/latest/deploycommand/
# Replace with `drush deploy` once Drush 10 is upgraded
# If updated, also update in devops:post-deploy-tasks.yml and .tugboat/config.yml
- appserver: cd $LANDO_WEBROOT && drush updatedb --cache-clear=0 -y
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this pattern BRD?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's the reason for changing from doing a cache clear as the first step, to removing it AND setting the --cache-clear=0 option?

It is because Drush 10 recommends that sequence, See https://www.drush.org/latest/deploycommand/.

Also, Drush 10 will have the drush updatedb --no-cache-clear option, and until then it will be --cache-clear=0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ElijahLynn what scenarios did you test?

I just tested that tests pass in local Lando, Tugboat and BRD.

@@ -111,11 +112,14 @@ services:
- j2 "${TUGBOAT_ROOT}/.tugboat/.env.j2" -o "${TUGBOAT_ROOT}/.env"
# This command is shared by the clone and build stages, make sure to update both stages.
- j2 "${TUGBOAT_ROOT}/.web/403-error-document.j2.html" -o "${TUGBOAT_ROOT}/.web/403-error-document.html"
- composer install --optimize-autoloader --apcu-autoloader
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this since we declare the same ones in composer.json config key and easier to maintain across Lando, Tugboat and BRD.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I saw -- IDK why I didn't replace that in my original PR 🤷‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for confirming!

@ElijahLynn ElijahLynn changed the title VACMS-3904 Remove deploy steps from tests.yml VACMS-3904 Remove deploy steps from tests.yml & change order of deploy steps to match drush deploy Feb 22, 2021
@indytechcook
Copy link
Contributor

@ElijahLynn what scenarios did you test?

# Follows `drush deploy` sequence recommendations - https://www.drush.org/latest/deploycommand/
# Replace with `drush deploy` once Drush 10 is upgraded
# If updated, also update in devops:post-deploy-tasks.yml and .tugboat/config.yml
- appserver: cd $LANDO_WEBROOT && drush updatedb --cache-clear=0 -y
Copy link
Contributor

@swirtSJW swirtSJW Feb 22, 2021

Choose a reason for hiding this comment

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

What's the reason for changing from doing a cache clear as the first step, to removing it AND setting the --cache-clear=0 option?

There was a specific reason we add the initial cache clear but I don't recall what it was.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The initial cache rebuild was because I copied it from https://drupal.stackexchange.com/a/254411/6602. The answer is now updated with these new recommendations, it appears.

- drush cache:rebuild
- drush config:import -y
- drush updatedb --cache-clear=0 -y
Copy link
Contributor

Choose a reason for hiding this comment

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

This old order seems wrong, so YES I approve making it consistent with our other steps.

@ElijahLynn ElijahLynn merged commit 1957f94 into department-of-veterans-affairs:master Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps CMS team practice area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants