Skip to content

Use the GHA base container for Lint (Docs)#25173

Merged
ptgott merged 3 commits intomasterfrom
paul.gottschling/2023-04-25-lint-docs-ubuntu
May 5, 2023
Merged

Use the GHA base container for Lint (Docs)#25173
ptgott merged 3 commits intomasterfrom
paul.gottschling/2023-04-25-lint-docs-ubuntu

Conversation

@ptgott
Copy link
Copy Markdown
Contributor

@ptgott ptgott commented Apr 25, 2023

This way, we can take advantage of the software the comes pre-installed on the GHA ubuntu-latest container image. Otherwise, we need to find a way to portably install Chromium on the gravitational/docs container in order to run the Mermaid CLI. Currently, the docs engine exits with an error during the "Lint (Docs)" job when attempting to build mermaid diagrams due to not being able to locate Chromium.

For this change to work, the "Lint (Docs)" job checks out gravitational/docs, removes the default git submodule configuration, then adds a git submodule for the current gravitational/teleport branch. From there, it can install dependencies via yarn and run our CI scripts.

Reviewer note: Here is a successful Lint (Docs) run: https://github.com/gravitational/teleport/actions/runs/4768585354/jobs/8478204853

This way, we can take advantage of the software the comes pre-installed
on the GHA `ubuntu-latest` container image. Otherwise, we need to find a
way to portably install Chromium on the `gravitational/docs` container
in order to run the Mermaid CLI. Currently, the docs engine exits with
an error during the "Lint (Docs)" job when attempting to build mermaid
diagrams due to not being able to locate Chromium.

For this change to work, the "Lint (Docs)" job checks out
`gravitational/docs`, removes the default git submodule configuration,
then adds a git submodule for the current `gravitational/teleport`
branch. From there, it can install dependencies via `yarn` and run our
CI scripts.
@ptgott ptgott requested a review from avatus April 25, 2023 21:44
@github-actions github-actions Bot requested a review from jimbishopp April 25, 2023 21:44
@ptgott ptgott mentioned this pull request Apr 28, 2023
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from jimbishopp April 28, 2023 18:47
@ptgott ptgott enabled auto-merge April 28, 2023 19:51
@ptgott ptgott added this pull request to the merge queue Apr 28, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2023
@ptgott ptgott marked this pull request as draft April 28, 2023 19:56
@ptgott
Copy link
Copy Markdown
Contributor Author

ptgott commented Apr 28, 2023

This PR was removed from the merge queue because (ironically) this job failed (https://github.com/gravitational/teleport/actions/runs/4834250893/jobs/8615249557), so I am going to convert this back into a draft while I investigate.

@ptgott
Copy link
Copy Markdown
Contributor Author

ptgott commented May 1, 2023

Looks like the command below failed because $GITHUB_HEAD_REF is empty for the merge_group event:

git submodule add --force -b $GITHUB_HEAD_REF -- https://github.com/gravitational/teleport

...so the error is:

'origin/--' is not a commit and a branch '--' cannot be created from it

Should we change the merge_group trigger to something else? Is there anything else you'd recommend? Thanks!

@ptgott ptgott marked this pull request as ready for review May 3, 2023 21:10
@github-actions github-actions Bot requested a review from jimbishopp May 3, 2023 21:10
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from jimbishopp May 3, 2023 23:15
@ptgott ptgott enabled auto-merge May 4, 2023 21:25
@ptgott ptgott added this pull request to the merge queue May 4, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 4, 2023
@ptgott ptgott force-pushed the paul.gottschling/2023-04-25-lint-docs-ubuntu branch from 4b9d7e2 to 9ed3f5b Compare May 4, 2023 21:47
@ptgott ptgott added this pull request to the merge queue May 4, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 4, 2023
@ptgott ptgott force-pushed the paul.gottschling/2023-04-25-lint-docs-ubuntu branch from 9ed3f5b to 9e8669c Compare May 5, 2023 15:07
@ptgott ptgott added this pull request to the merge queue May 5, 2023
@ptgott ptgott removed this pull request from the merge queue due to a manual request May 5, 2023
@ptgott ptgott added this pull request to the merge queue May 5, 2023
@ptgott ptgott removed this pull request from the merge queue due to a manual request May 5, 2023
@ptgott ptgott added this pull request to the merge queue May 5, 2023
@ptgott ptgott removed this pull request from the merge queue due to a manual request May 5, 2023
@ptgott ptgott added this pull request to the merge queue May 5, 2023
Merged via the queue into master with commit daa8361 May 5, 2023
@ptgott ptgott deleted the paul.gottschling/2023-04-25-lint-docs-ubuntu branch May 5, 2023 15:47
@public-teleport-github-review-bot
Copy link
Copy Markdown

@ptgott See the table below for backport results.

Branch Result
branch/v10 Create PR
branch/v11 Create PR
branch/v12 Create PR
branch/v13 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants