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

Merged
merged 28 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6cf39f7
build content docs - take 1
kobymeir Sep 5, 2024
934b72f
build content docs - take 2
kobymeir Sep 5, 2024
a11a85a
build content docs - take 3
kobymeir Sep 5, 2024
fa2d74b
build content docs - take 4
kobymeir Sep 5, 2024
936a4e2
build content docs - take 5
kobymeir Sep 5, 2024
57a341b
build content docs - take 6
kobymeir Sep 5, 2024
222649d
build content docs - take 7
kobymeir Sep 8, 2024
97a8bbe
build content docs - take 8
kobymeir Sep 9, 2024
495da0a
build content docs - take 9
kobymeir Oct 6, 2024
f0ff634
build content docs - take 10
kobymeir Oct 6, 2024
aa3653a
build content docs - take 11
kobymeir Oct 6, 2024
dba1e3e
build content docs - take 12
kobymeir Oct 7, 2024
e237657
build content docs - take 13
kobymeir Oct 10, 2024
69988ac
build content docs - take 14
kobymeir Oct 10, 2024
9de50c7
build content docs - take 15
kobymeir Oct 15, 2024
eeab2eb
build content docs - take 16
kobymeir Oct 15, 2024
c69582c
build content docs - take 17
kobymeir Oct 20, 2024
1eec8f0
build content docs - take 18
kobymeir Oct 20, 2024
3d3c448
build content docs - take 19
kobymeir Oct 21, 2024
ccca6d0
build content docs - take 19
kobymeir Oct 22, 2024
10a66fd
build content docs - take 20
kobymeir Oct 27, 2024
e602588
build content docs - take 20
kobymeir Nov 5, 2024
5b77b2d
Apply suggestions from code review
kobymeir Nov 26, 2024
bd27202
build content docs - take 21
kobymeir Nov 26, 2024
236ca8e
build content docs - take 22
kobymeir Nov 26, 2024
3c83101
build content docs - take 22
kobymeir Nov 26, 2024
c95f9fe
build content docs - take 23
kobymeir Nov 26, 2024
af6865f
build content docs - take 24
kobymeir Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 0 additions & 182 deletions .circleci/config.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/forked-pr-deploy.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ static/assets/deprecated*.json
/src/pages/marketplace/details
/index
index.zip
index.json
index.json
/.firebase/hosting.*.cache
/firebase-debug.log
/firebase_json_key.json
7 changes: 7 additions & 0 deletions .gitlab/ci/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variables:
CURRENT_BRANCH_NAME: infra-content-docs
kobymeir marked this conversation as resolved.
Show resolved Hide resolved

include:
- file: "/.gitlab/ci/content-docs/.gitlab-ci.yml"
ref: $INFRA_BRANCH
project: "${CI_PROJECT_NAMESPACE}/infra"
82 changes: 82 additions & 0 deletions .gitlab/helper_functions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/bash

CLEAR="\e[0m"
kobymeir marked this conversation as resolved.
Show resolved Hide resolved
NC='\033[0m'
CYAN="\e[0;36m"
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
SECTION_START="\e[0Ksection_start:the_time:section_id\r\e[0K${CYAN}section_header${CLEAR}"
SECTION_END="\e[0Ksection_end:the_time:section_id\r\e[0K"
DATE_FMT="[%Y-%m-%dT%H:%M:%S.%3N]"

section_start() {
local section_header section_id start
start="$SECTION_START"
if [[ "$#" -eq 1 ]]; then
section_header="$1"
section_id="$(echo "$1" | tr -c '[:alnum:]\n\r' '_')"
elif [[ "$#" -eq 2 ]]; then
if [[ "$2" =~ -{0,2}collapsed ]]; then
start="${start/section_id/section_id[collapsed=true]}"
section_header="$1"
section_id="$(echo "$1" | tr -c '[:alnum:]\n\r' '_')"
else
section_header="$2"
section_id="$1"
fi
elif [[ "$#" -eq 3 && "$3" =~ /^-{0,2}collapsed$/ ]]; then
start="${start/section_id/section_id[collapsed=true]}"
section_header="$2"
section_id="$1"
else
echo "section_start should be called with 1-3 args but it was called with $# args"
echo "acceptable usages:"
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"
echo "where <section-start-id> is only alphanumeric characters and underscore and"
echo "--collapse indicates that you would like those log steps to be collapsed in the job log output by default"
exit 9
fi
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 +"${DATE_FMT} section start"
}

section_end() {
local section_id end
date +"${DATE_FMT} section end"
end="$SECTION_END"
if [[ "$#" -eq 1 ]]; then
section_id="$(echo "$1" | tr -c '[:alnum:]\n\r' '_')"
else
echo "section_end should be called with 1 arg but it was called with $# args"
echo "acceptable usage:"
echo " 1. section_end \"<section-start-id>\""
echo " 2. section_start \"<section-header>\""
echo "where <section-start-id> or <section-header> is that of the section this marks the end of"
exit 9
fi
end_time=$(date +%s)
end="$(echo "$end" | sed -e "s/the_time/$end_time/" -e "s/section_id/$section_id/")"
echo -e "$end"
}

job-done() {
mkdir -p "${PIPELINE_JOBS_FOLDER}"
echo "creating file ${PIPELINE_JOBS_FOLDER}/${CI_JOB_NAME}.txt"
echo "done" > "${PIPELINE_JOBS_FOLDER}/${CI_JOB_NAME}.txt"
echo "finished writing to file ${PIPELINE_JOBS_FOLDER}/${CI_JOB_NAME}.txt"
}

sleep-with-progress() {
local sleep_time=${1:-10}
local sleep_interval=${2:-1}
local sleep_message=${3:-"Sleeping... "}
local columns=${4:-$(tput cols)}
local sleep_step=$((sleep_time / sleep_interval))
for ((i=0; i< sleep_step;i++)); do echo "${sleep_interval}";sleep "${sleep_interval}"; done | poetry run tqdm --total ${sleep_time} --unit seconds --leave --update --colour green -ncols ${columns} --desc "${sleep_message}" 1> /dev/null
}
Loading
Loading