Skip to content

Commit e65881d

Browse files
authored
Update secondary vendor site name (#3841)
* Rename secondary vendor site to upsun. * Not found error + timeout. * Update scope. * again.
1 parent 88b89c1 commit e65881d

File tree

357 files changed

+39
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+39
-39
lines changed

.github/workflows/generate-cli-commands-page.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
BRANCH_TITLE: cli-commands-doc-page
1717
DEFAULT_BRANCH: "main"
1818
PLATFORMSH_CLI_DOC_PATH: "sites/platform/src/administration/cli/reference.md"
19-
UPSUN_CLI_DOC_PATH: "sites/friday/src/administration/cli/reference.md"
19+
UPSUN_CLI_DOC_PATH: "sites/upsun/src/administration/cli/reference.md"
2020
permissions:
2121
contents: write
2222

.platform/applications.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
size: S
6767

6868
- # The name of this application, which must be unique within a project.
69-
name: 'friday'
69+
name: 'upsun'
7070

7171
# The type key specifies the language and version for your application.
7272
type: 'nodejs:20'
@@ -75,7 +75,7 @@
7575
variables:
7676
env:
7777
HUGOVERSION: 0.116.0
78-
SITE_DIR: 'sites/friday'
78+
SITE_DIR: 'sites/upsun'
7979

8080
build:
8181
flavor: none
@@ -111,7 +111,7 @@
111111
locations:
112112
'/':
113113
# The public directory of the application relative to its root.
114-
root: 'sites/friday/public'
114+
root: 'sites/upsun/public'
115115
passthru: true
116116
index: ['index.html']
117117
scripts: false
@@ -124,8 +124,8 @@
124124
disk: 1024
125125

126126
mounts:
127-
"sites/friday/public/scripts/xss/dist/config":
127+
"sites/upsun/public/scripts/xss/dist/config":
128128
source: local
129-
source_path: "sites/friday/config"
129+
source_path: "sites/upsun/config"
130130

131131
size: S

.platform/routes.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ https://{default}/:
272272

273273
https://docs.upsun.com/:
274274
type: upstream
275-
upstream: friday:http
276-
id: friday
275+
upstream: upsun:http
276+
id: upsun
277277
cache:
278278
enabled: true
279279
ssi:

README.md

+7-7

search/index_external_sites.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
cleanup(){
44
echo "* CLEANING UP OLD DOCS INDEX"
55
rm -f output/platform_index.json
6-
rm -f output/friday_index.json
6+
rm -f output/upsun_index.json
77

88
}
99

@@ -27,9 +27,9 @@ update_index(){
2727
POETRY_LOCATION=/app/.local/bin/poetry
2828
# Update indexes
2929
$POETRY_LOCATION run python createPrimaryIndex.py platform
30-
$POETRY_LOCATION run python createPrimaryIndex.py friday
30+
$POETRY_LOCATION run python createPrimaryIndex.py upsun
3131
$POETRY_LOCATION run python main.py platform
32-
$POETRY_LOCATION run python main.py friday
32+
$POETRY_LOCATION run python main.py upsun
3333
}
3434

3535
# scrape

search/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ def update(self):
129129
# Create a new index
130130
create_index_task = client.create_index(uid=self.docs_index, options={'primaryKey': self.primaryKey, 'uid': self.index_name})
131131

132-
timeout = 5000
132+
timeout = 10000
133133
if "friday" == docs_index_name:
134134
timeout = 15000
135135

136136
try:
137137
client.wait_for_task(create_index_task['taskUid'], timeout)
138-
except MeilisearchTimeoutError as merror:
138+
except meilisearch.errors.MeilisearchTimeoutError as merror:
139139
print('Failed waiting {0} milliseconds for Meilisearch to create the index. Error message: {1}'.format(timeout, merror))
140140
return
141141

search/post_deploy.sh

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
cleanup(){
44
echo "* CLEANING UP OLD DOCS INDEX"
55
rm -v output/platform_docs.json && echo "output json for platform deleted" || echo "failed to delete output json for platform"
6-
rm -v output/friday_docs.json && echo "output json for upsun deleted" || echo "failed to delete output json for upsun"
6+
rm -v output/upsun_docs.json && echo "output json for upsun deleted" || echo "failed to delete output json for upsun"
77
}
88

99
getDocsData() {
1010
# Get the frontend URLs
1111
PLATFORM_DOCS_URL=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.primary) | .key')
12-
FRIDAY_DOCS_URL=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.id=="friday") | .key')
12+
UPSUN_DOCS_URL=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.id=="upsun") | .key')
1313

1414
printf "URL for platform docs: %s\n" "${PLATFORM_DOCS_URL}"
15-
printf "URL for upsun docs: %s\n" "${FRIDAY_DOCS_URL}"
15+
printf "URL for upsun docs: %s\n" "${UPSUN_DOCS_URL}"
1616

1717
# Delete docs index in the mount if it exists
1818
rm -v data/platform_index.json && echo "data json for platform deleted" || echo "failed to delete data json for platform"
19-
rm -v data/friday_index.json && echo "data json for upsun deleted" || echo "failed to delete data json for upsun"
19+
rm -v data/upsun_index.json && echo "data json for upsun deleted" || echo "failed to delete data json for upsun"
2020

2121
# remove the previous headers log
2222
if [ -f "data/platform-headers.txt" ]; then
@@ -34,17 +34,17 @@ getDocsData() {
3434
# curl --user-agent "request-to-upsun-docs" -s -D - -o foobar.json "https://docs.upsun.com/index.json" >> headers.txt
3535
curl --user-agent "request-search-index-for-platform-docs" -s -D - -o data/platform_index.json "${PLATFORM_DOCS_URL}index.json" >> data/platform-headers.txt
3636
#curl -s "${PLATFORM_DOCS_URL}index.json" >> data/platform_index.json && echo "retrieved psh index" || echo "failed to retrieve psh index"
37-
curl --user-agent "request-search-index-for-upsun-docs" -s -D - -o data/friday_index.json "${FRIDAY_DOCS_URL}index.json" >> data/upsun-headers.txt
38-
#curl -s "${FRIDAY_DOCS_URL}index.json" >> data/friday_index.json && echo "retrieved upsun index" || echo "failed to retrieve upsun index"
37+
curl --user-agent "request-search-index-for-upsun-docs" -s -D - -o data/upsun_index.json "${UPSUN_DOCS_URL}index.json" >> data/upsun-headers.txt
38+
#curl -s "${UPSUN_DOCS_URL}index.json" >> data/upsun_index.json && echo "retrieved upsun index" || echo "failed to retrieve upsun index"
3939

4040
# How many times does Platform.sh appear in the platform index? Should be 3815
4141
pshOccurrenceInPsh=$(cat data/platform_index.json | grep -o -i Platform.sh | wc -l)
4242
# How many times does Platform.sh appear in the Upsun index? should be 33
43-
pshOccurrenceInUpsun=$(cat data/friday_index.json | grep -o -i Platform.sh | wc -l)
43+
pshOccurrenceInUpsun=$(cat data/upsun_index.json | grep -o -i Platform.sh | wc -l)
4444
#How many times does Upsun appear in the platform index? Should be 0
4545
upsunOccurrenceInPsh=$(cat data/platform_index.json | grep -o -i Upsun | wc -l)
4646
#how many times does Upsun appear in the upsun index? Should be 4616
47-
upsunOccurrenceInUpsun=$(cat data/friday_index.json | grep -o -i Upsun | wc -l)
47+
upsunOccurrenceInUpsun=$(cat data/upsun_index.json | grep -o -i Upsun | wc -l)
4848

4949
printf "Upsun appears %d times in the platform index.\nUpsun appears %d times in the Upsun index.\n" "${upsunOccurrenceInPsh}" "${upsunOccurrenceInUpsun}"
5050
printf "Platform appears %d times in the platform index.\nPlatform appears %d times in the Upsun index.\n" "${pshOccurrenceInPsh}" "${pshOccurrenceInUpsun}"
@@ -62,25 +62,25 @@ getDocsData() {
6262

6363
# Delete templates index in the mount if it exists
6464
rm -f data/platform_templates.yaml
65-
rm -f data/friday_templates.yaml
65+
rm -f data/upsun_templates.yaml
6666

6767
# Get the updated index for templates
6868
curl -s "${PLATFORM_DOCS_URL}files/indexes/templates.yaml" >> data/platform_templates.yaml
6969

7070
# @todo: For now, reuse the same index. To be removed entirely.
71-
cp data/platform_templates.yaml data/friday_templates.yaml
71+
cp data/platform_templates.yaml data/upsun_templates.yaml
7272
}
7373

7474
update_index(){
7575
echo "* UPDATING INDEX"
7676
POETRY_LOCATION=/app/.local/bin/poetry
7777
# Create indices for templates and docs
7878
$POETRY_LOCATION run python createPrimaryIndex.py platform
79-
$POETRY_LOCATION run python createPrimaryIndex.py friday
79+
$POETRY_LOCATION run python createPrimaryIndex.py upsun
8080

8181
# Update indexes
8282
$POETRY_LOCATION run python main.py platform
83-
$POETRY_LOCATION run python main.py friday
83+
$POETRY_LOCATION run python main.py upsun
8484
}
8585

8686
save_headers() {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sites/friday/build_docs.sh renamed to sites/upsun/build_docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ else
3939
fi
4040

4141
echo "Moving the hugo binary from cache into the application."
42-
cp "${PLATFORM_CACHE_DIR}/hugo_${HUGOVERSION}/hugo" "${PLATFORM_APP_DIR}/sites/friday"
42+
cp "${PLATFORM_CACHE_DIR}/hugo_${HUGOVERSION}/hugo" "${PLATFORM_APP_DIR}/sites/upsun"
4343

4444
# Build the Hugo site
4545
./hugo

sites/friday/config/_default/params.yaml renamed to sites/upsun/config/_default/params.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
# Basics
3-
version: "1.1.0"
4-
description: Deploy Friday User Documentation
5-
author: Deploy Friday
3+
version: "1.0.19"
4+
description: UPSUN User Documentation
5+
author: Upsun
66
title: User documentation
77
issuerepo: "https://github.com/platformsh/platformsh-docs/"
88
repo: "https://github.com/platformsh/platformsh-docs/"
9-
folder: "sites/friday"
9+
folder: "sites/upsun"
1010
editPageButton: true
1111

1212
theme:

sites/friday/deploy.sh renamed to sites/upsun/deploy.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
MEILI_CONFIG_DEST=public/scripts/xss/dist/config/config.json
55

66
# The index won't be built until the post_deploy hook, so we hardcode it here.
7-
MEILI_INDEX="friday_docs"
7+
MEILI_INDEX="upsun_docs"
88

99
createSearchConfig() {
1010
# Use the shared PLATFORM_PROJECT_ENTROPY var as MEILI_MASTER_KEY to retrieve the public key for our autocomplete app.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)