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

welcoming robots in certain situations #613

Merged
merged 15 commits into from
Nov 10, 2021
Merged

welcoming robots in certain situations #613

merged 15 commits into from
Nov 10, 2021

Conversation

thewatermethod
Copy link
Collaborator

@thewatermethod thewatermethod commented Nov 8, 2021

Description of change

Right now, the same robots.txt file is served across all environments, in which all indexing is allowed, leading to Google indexing non-prod environments. This PR makes the robots.txt file disallow all by default and adds a bash script that runs on deploy. If the deploy is for prod, then the robots.txt file will be altered to allow indexing.

How to test

I have tested this out by adding a comment to the robots.txt on dev.

Screen Shot 2021-11-09 at 12 35 31 PM

Issue(s)

Checklists

Every PR

  • Meets issue criteria
  • JIRA ticket status updated
  • Code is meaningfully tested
  • [n/a] Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • [n/a] API Documentation updated
  • [n/a] Boundary diagram updated
  • [n/a] Logical Data Model updated
  • [n/a] Architectural Decision Records written for major infrastructure decisions

Production Deploy

  • Staging smoke test completed

After merge/deploy

  • Update JIRA ticket status

@thewatermethod thewatermethod marked this pull request as ready for review November 9, 2021 18:10
@@ -0,0 +1,10 @@
#!/bin/bash

if [[ "$CURRENT_GIT_URL" == "$PROD_GIT_URL" && "$PROD_GIT_BRANCH" == "$CURRENT_GIT_BRANCH" ]];
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to move this check out into the circle-ci config? I think I like it better there, but open to other opinions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Something like this? I'm agnostic.
Didn't work when I tried it, that's how I got sent down the environment variable route but I think I know why that was.

      - when:  # prod
          condition:
            and:
              - equal: [<< pipeline.project.git_url >>, << pipeline.parameters.prod_git_url >>]
              - equal: [<< pipeline.git.branch >>, << pipeline.parameters.prod_git_branch >>]
          steps:
            - build_robot: #build robot

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah something like that. If you can't get it to work I think it is fine to leave it in the script.

jasalisbury
jasalisbury previously approved these changes Nov 10, 2021
.circleci/config.yml Outdated Show resolved Hide resolved
Co-authored-by: Josh Salisbury <[email protected]>
@thewatermethod thewatermethod merged commit b40e3fc into main Nov 10, 2021
@thewatermethod thewatermethod deleted the TTAHUB276 branch November 10, 2021 18:03
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.

2 participants