Skip to content

Commit b94ab8b

Browse files
committed
Merge branch 'feature/add_yml_file_for_auto_publish' into 'master'
feature: Add yml file for CDP auto-publish Closes DOC-11238 See merge request ae_group/esp-iot-solution!1292
2 parents 6e589f6 + 85dd051 commit b94ab8b

File tree

5 files changed

+152
-2
lines changed

5 files changed

+152
-2
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ include:
3232
- '.gitlab/ci/docs.yml'
3333
- '.gitlab/ci/deploy.yml'
3434
- '.gitlab/ci/target_test.yml'
35+
- '.gitlab/ci/publish_docs_to_cdp.yml'

.gitlab/ci/publish_docs_to_cdp.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.publish_to_cdp_template:
2+
stage: deploy
3+
image: $ESP_DOCS_ENV_IMAGE
4+
tags:
5+
- deploy_docs
6+
script:
7+
- git config --global credential.helper store
8+
# Pass GitLab credentials
9+
- echo "https://gitlab-ci-token:${CI_JOB_TOKEN}@{CI_SERVER_HOST}:${CI_SERVER_PORT}/documentation" >> ~/.git-credentials
10+
- TOOLS_URL="${CI_SERVER_PROTOCOL}://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/documentation/documentation-tools.git"
11+
- echo $TOOLS_URL
12+
- git clone -b feature/add_dmf_tool $TOOLS_URL
13+
- ls -al # debugging
14+
# Read labels from MR
15+
- chmod +x ./documentation-tools/dmf-tool/parse_labels.sh
16+
- ./documentation-tools/dmf-tool/parse_labels.sh
17+
- cat parse_labels_output.txt
18+
# Read parsed PRODUCT_NAME
19+
- source parse_labels_output.txt
20+
# Skip if no product to publish
21+
- |
22+
if [ -z "$PRODUCT_NAME" ]; then
23+
echo "No product to publish, exiting job."
24+
exit 0
25+
fi
26+
# Generate DMFs
27+
- python documentation-tools/dmf-tool/generate-dmf.py -p . -t documentation-tools/dmf-tool/dmf-template.yml
28+
- mkdir -p logs
29+
- mv ESP*.yml logs/
30+
- |
31+
if [ -n "$CI_MERGE_REQUEST_IID" ]; then
32+
TRACKING_REF="$CI_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID"
33+
else
34+
TRACKING_REF="$CI_PROJECT_URL/-/pipelines/$CI_PIPELINE_ID"
35+
fi
36+
37+
for file in logs/*.yml; do
38+
echo "tracking_reference: $TRACKING_REF" >> "$file"
39+
echo "revision_date: $(date +%Y-%m-%d)" >> "$file"
40+
done
41+
42+
# Publish to CDP
43+
- chmod +x ./documentation-tools/dmf-tool/publish_cdp.sh
44+
- ./documentation-tools/dmf-tool/publish_cdp.sh
45+
artifacts:
46+
when: always
47+
paths:
48+
- 'logs/*.yml'
49+
expire_in: 1 week
50+
51+
publish_to_cdp_qa_with_dmf_files:
52+
needs:
53+
- deploy_docs_preview
54+
extends:
55+
- .publish_to_cdp_template
56+
- .rules:deploy:docs_preview
57+
variables:
58+
MR_BASE_URL: " $CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests"
59+
CDP_API_ENDPOINT: "$CDP_API_ENDPOINT_QA"
60+
61+
publish_to_cdp_prod_with_dmf_files:
62+
needs:
63+
- deploy_docs_production
64+
extends:
65+
- .publish_to_cdp_template
66+
- .rules:deploy:docs_production
67+
variables:
68+
CDP_API_ENDPOINT: "$CDP_API_ENDPOINT_PROD"

.lbcf.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
####################################
2+
# Shared Configuration
3+
####################################
4+
5+
#syntax_version: version of this YMAL file. This configuration is shared by all documents in one project.
6+
syntax_version: v0.62
7+
8+
9+
######################################
10+
# Document-specific Configuration
11+
######################################
12+
13+
documents:
14+
#######################################################
15+
# 1. ESP-IoT-Solution Programming Guide, SDK latest
16+
#######################################################
17+
18+
- document_name: ESP-IoT-Solution Programming Guide, SDK latest
19+
doc_id: 9063
20+
translation_docid: 9065
21+
chip_series: all
22+
product_name:
23+
- ESP-IoT-Solution latest
24+
product_name_old_website:
25+
- ESP32-C5
26+
- ESP32-C6
27+
- ESP32-C3
28+
- ESP32-H2
29+
- ESP32
30+
- ESP8684
31+
- ESP32-S2
32+
- ESP32-S3
33+
- ESP32-P4
34+
soc_series_base_filter: all
35+
document_type: guide # or errata, datasheet, reference, book, guide, application note
36+
document_type_old_website: guide
37+
document_status: active
38+
version: Latest # or specific version number
39+
revision_date:
40+
language: en # or cn
41+
document_storage: docs
42+
document_link: https://docs.espressif.com/projects/esp-iot-solution/en/latest/index.html
43+
document_summary: This is the documentation for ESP-IoT-Solution Development Framework.
44+
notify_subscribers: false
45+
visibility_on_website: show # or hide
46+
scheduled_release_date:
47+
document_classification: public
48+
#############################################
49+
# 2. ESP-IoT-Solution 编程指南,SDK latest
50+
#############################################
51+
52+
- document_name: ESP-IoT-Solution 编程指南, SDK latest
53+
doc_id: 9065
54+
translation_docid: 9063
55+
chip_series: all
56+
product_name:
57+
- ESP-IoT-Solution latest
58+
product_name_old_website:
59+
- ESP32-C5
60+
- ESP32-C6
61+
- ESP32-C3
62+
- ESP32-H2
63+
- ESP32
64+
- ESP8684
65+
- ESP32-S2
66+
- ESP32-S3
67+
- ESP32-P4
68+
soc_series_base_filter: all
69+
document_type: guide # or errata, datasheet, reference, book, guide, application note
70+
document_type_old_website: guide
71+
document_status: active
72+
version: Latest # or specific version number
73+
revision_date:
74+
language: cn # or cn
75+
document_storage: docs
76+
document_link: https://docs.espressif.com/projects/esp-iot-solution/zh_CN/latest/index.html
77+
document_summary: 这里是乐鑫 ESP-IoT-Solution 开发框架的文档中心。
78+
notify_subscribers: false
79+
visibility_on_website: show # or hide
80+
scheduled_release_date:
81+
document_classification: public

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ We welcome contributions to the esp-iot-solution project!
66
How to Contribute
77
--------------------
88

9-
Contributions to esp-iot-solution - fixing bugs, adding features, adding documentation - are welcome. We accept contributions via `Github Pull Requests <https://help.github.com/articles/about-pull-requests>`_.
9+
Contributions to esp-iot-solution - fixing bugs, adding features, adding documentation - are welcome. We accept contributions via `GitHub Pull Requests <https://help.github.com/articles/about-pull-requests>`_.
1010

1111
Before Contributing
1212
----------------------

docs/en/bluetooth/ble_conn_mgr.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BLE Connection Management
66
Supported Socs ESP32 ESP32-C2 ESP32-C3 ESP32-S3
77
================== =========== =============== =============== =============
88

9-
The BLE connection management provide a simplified API interface for accessing the commonly used BLE functionality. It supports common scenarios like peripheral, central among others.
9+
The BLE connection management provides a simplified API interface for accessing the commonly used BLE functionality. It supports common scenarios like peripheral, central among others.
1010

1111
Application Example
1212
---------------------------

0 commit comments

Comments
 (0)