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

build content docs - in gitlab #1619

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

build content docs - in gitlab #1619

wants to merge 22 commits into from

Conversation

kobymeir
Copy link
Contributor

@kobymeir kobymeir commented Sep 5, 2024

Status

In Progress

Related Issues

fixes: link to the issue

Description

gitlab CI build for docs

@xsoar-bot
Copy link

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-fd4eqqij.web.app


Important: Make sure to inspect your changes at the preview site.

2 similar comments
@xsoar-bot
Copy link

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-fd4eqqij.web.app


Important: Make sure to inspect your changes at the preview site.

@xsoar-bot
Copy link

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-fd4eqqij.web.app


Important: Make sure to inspect your changes at the preview site.

Copy link

stale bot commented Oct 5, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

If you'd like to keep it open, please leave a comment with the status of the PR.

Thank you for your contribution!

@stale stale bot added the stale label Oct 5, 2024
@xsoar-bot
Copy link

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-l8pmvv7q.web.app


Important: Make sure to inspect your changes at the preview site.

@stale stale bot removed the stale label Oct 6, 2024
@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

4 similar comments
@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

2 similar comments
@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@content-bot
Copy link
Collaborator

Preview Site Available

Congratulations! The automatic build has completed successfully.
A preview site is available at: https://xsoar-pan-dev--pull-request-1619-a3r3zyp5.web.app


Important: Make sure to inspect your changes at the preview site.

@kobymeir kobymeir marked this pull request as ready for review November 10, 2024 17:06
Copy link
Contributor

@tkatzir tkatzir left a comment

Choose a reason for hiding this comment

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

Very nice!
Approved, with comments.

index.json
/.firebase/hosting.YnVpbGQ.cache
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this YnVpbGQ magic value?

#!/bin/bash

CYAN="\e[0;36m"
CLEAR="\e[0m"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put CLEAR at the start or the end of this list.

Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't be in the end since we use it in line 5

Comment on lines +34 to +37
echo " 1. section_start \"<section-start-id>\" \"<section-header>\""
echo " 2. section_start \"<section-header>\""
echo " 3. section_start \"<section-start-id>\" \"<section-header>\" --collapse"
echo " 4. section_start \"<section-header>\" --collapse"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest to group by functionality

Suggested change
echo " 1. section_start \"<section-start-id>\" \"<section-header>\""
echo " 2. section_start \"<section-header>\""
echo " 3. section_start \"<section-start-id>\" \"<section-header>\" --collapse"
echo " 4. section_start \"<section-header>\" --collapse"
echo " 2. section_start \"<section-header>\""
echo " 4. section_start \"<section-header>\" --collapse"
echo " 1. section_start \"<section-start-id>\" \"<section-header>\""
echo " 3. section_start \"<section-start-id>\" \"<section-header>\" --collapse"

start_time=$(date +%s)
start="$(echo "$start" | sed -e "s/the_time/$start_time/" -e "s/section_id/$section_id/" -e "s/section_header/$section_header/")"
echo -e "$start"
date +"[%Y-%m-%dT%H:%M:%S.%3N] section start"
Copy link
Contributor

Choose a reason for hiding this comment

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

[%Y-%m-%dT%H:%M:%S.%3N] is candidate for a CONST?
Used more than once...

section_header="$2"
section_id="$1"
else
echo "section_start should be called with 1-3 args but it was called with $#"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo "section_start should be called with 1-3 args but it was called with $#"
echo "section_start should be called with 1-3 args but it was called with $# args"

Comment on lines +158 to +159
#echo "Installing pipenv..."
#pipenv install
Copy link
Contributor

Choose a reason for hiding this comment

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

Still needed?

echo "Generating docs..."
pipenv run ./gendocs.py -t "${TARGET_DIR}" -d "${CONTENT_GIT_DIR}" -b "${CURRENT_BRANCH}"
#pipenv run ./gendocs.py -t "${TARGET_DIR}" -d "${CONTENT_GIT_DIR}" -b "${CURRENT_BRANCH}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Still needed?

echo "Generating Demisto class and CommonServerPython docs..."
pipenv run ./gen_pydocs.py -t "${TARGET_DIR}"
#pipenv run ./gen_pydocs.py -t "${TARGET_DIR}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Still needed?

if [[ "$CURRENT_BRANCH" != "master" && "$CURRENT_BRANCH" != *"gen-top-contrib"* ]]; then
echo "Skipping top contributors page generation, should run only on master or branch containing 'gen-top-contrib'."
exit 0
else
echo "Generating top contributors page..."
pipenv run python ./gen_top_contrib.py -t "${CONTRIB_TARGET_DIR}"
poetry run ./gen_top_contrib.py -t "${CONTRIB_TARGET_DIR}"
# pipenv run python ./gen_top_contrib.py -t "${CONTRIB_TARGET_DIR}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Still needed?
(In previous places it was before the poetry :-)

@@ -135,7 +135,7 @@ def main():
PR_NUM: if set will use this as the pull request number. Otherwise will move on to CIRCLE_PULL_REQUEST
CIRCLE_PULL_REQUEST: pull request url to use to get the pull id. Such as: https://github.com/demisto/content-docs/pull/9
if CIRCLE_PULL_REQUEST will try to get issue id from last commit comment (case of merge into master)
CIRCLE_BRANCH: if set to master treats as a production deployment
Copy link
Contributor

Choose a reason for hiding this comment

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

CIRCLE_BRANCH still appears in the code above (e.g. line 109)

Copy link
Contributor

@MosheEichler MosheEichler left a comment

Choose a reason for hiding this comment

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

Nice work!!
Approved with comments

- id: ruff
args:
- --fix
exclude: CommonServerPython.py
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to exclude demistomock as well

@@ -0,0 +1,8 @@
variables:
CURRENT_BRANCH_NAME: infra-content-docs
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be master?


include:
- file: "/.gitlab/ci/content-docs/.gitlab-ci.yml"
ref: infra-content-docs
Copy link
Contributor

Choose a reason for hiding this comment

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

The same ☝️

#!/bin/bash

CYAN="\e[0;36m"
CLEAR="\e[0m"
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't be in the end since we use it in line 5

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.

5 participants