dcos-docs-site icon indicating copy to clipboard operation
dcos-docs-site copied to clipboard

Hm/add main workflow

Open hrantm opened this issue 2 years ago • 9 comments

Jira Ticket

Description of changes being made

Preview

You can preview the docs build using the following URL, adding the PR # where specified: http://docs-d2iq-com-pr-4627.s3-website-us-west-2.amazonaws.com/

Checklist

  • [ ] Test all commands and procedures, if applicable.
  • [ ] Update all links if you are moving a page.
  • [ ] Add release date to Release Notes page in the following format: <Package> was released on <Day>, <Month> <Year> Example: Mesosphere® DC/OS™ 2.1.0 was released on 9, June 2020

See the contribution guidelines for more information.

hrantm avatar Sep 09 '22 11:09 hrantm

@hrantm we had two stages when the branch was main: deploying to dev and deploying to prod. These produced different results as a result of having some varying env var values. I am not seeing the logic for this stage in here: https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L105

@vacas5 Hey Russ, can you show me where the logic is in the Jenkinsfile that is handling this because I don't see it anywhere

hrantm avatar Oct 04 '22 19:10 hrantm

yep. @hrantm: The stage "Build & Deploy Preview Docs" would run on all branches but beta (so it would run on main) https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L32. The variables for this stage are defined at the top of the Jenkins file.

The stage "Build & Deploy Production Docs" would run on main only https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L105

The DOCS_ENV var tells metalsmith to compile/skip files / folders that are not ready for production: https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L43

vacas5 avatar Oct 04 '22 20:10 vacas5

yep. @hrantm: The stage "Build & Deploy Preview Docs" would run on all branches but beta (so it would run on main) https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L32. The variables for this stage are defined at the top of the Jenkins file.

The stage "Build & Deploy Production Docs" would run on main only https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L105

The DOCS_ENV var tells metalsmith to compile/skip files / folders that are not ready for production: https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L43

hey @vacas5, @cmastr mentioned that it doesn't build to beta anymore, do I still need that logic? Also the original comment I was responding to mentioned deploying for dev vs prod, I dont see that logic anywhere. I see the beta vs main vs pr branch logic but I see nothing regarding dev

hrantm avatar Oct 04 '22 20:10 hrantm

it shouldn't build to beta anymore.

cmastr avatar Oct 05 '22 15:10 cmastr

yes "Build & Deploy Beta Docs" does not need to be implemented in Github actions

vacas5 avatar Oct 05 '22 15:10 vacas5

yes "Build & Deploy Beta Docs" does not need to be implemented in Github actions

@vacas5 Okay so I wont add the beta part, however its still unclear to me where the DEV vs PROD stuff happens as per this comment.

@hrantm we had two stages when the branch was main: deploying to dev and deploying to prod. These produced different results as a result of having some varying env var values. I am not seeing the logic for this stage in here: https://github.com/mesosphere/dcos-docs-site/blob/main/Jenkinsfile#L105

hrantm avatar Oct 05 '22 15:10 hrantm

@vacas5 This line in the job is causing errors in the script aws s3 sync --delete --quiet --acl bucket-owner-full-control ./build s3://docs-d2iq-com-pr-4627 Maybe its a permissions issue? Any idea if we need additional policies? Here is a link to the policies we gave to the role for docs site https://github.com/mesosphere/github-action-runners-deployment/blob/main/roles/dcos-docs-site.cf.yaml

hrantm avatar Oct 07 '22 18:10 hrantm

@jonathanbeber @hrantm @vacas5 how are we doing on finishing this up?

cmastr avatar Oct 19 '22 14:10 cmastr

is there a way to compare policies with what Jenkins currently has? @jonathanbeber @hrantm ?

vacas5 avatar Oct 19 '22 14:10 vacas5

Hey @vacas5, the workflow is passing, does everything look right?

hrantm avatar Nov 18 '22 10:11 hrantm

@jonathanbeber @vacas5 @cmastr Looks like its been deployed :). Please review this pr again when you have a chance http://docs-d2iq-com-pr-4627.s3-website-us-west-2.amazonaws.com/

hrantm avatar Nov 18 '22 11:11 hrantm

@jonathanbeber could you recheck PR and approve/dismiss your change request so we can merge?

cmastr avatar Dec 16 '22 15:12 cmastr

I didn't check all the code in this PR, @hrantm let me know if you need any help in here, otherwise you can merge it based on other reviews.

jonathanbeber avatar Dec 20 '22 19:12 jonathanbeber