Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ publish-docs:
script:
- scripts/gitlab/publish-docs.sh
tags:
- shell
- linux-docker

build-android:
stage: optional
Expand Down
21 changes: 16 additions & 5 deletions scripts/gitlab/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ clone_repos() {
echo "__________Clone repos__________"
git clone https://github.com/parity-js/jsonrpc.git jsonrpc
git clone https://github.com/paritytech/wiki.git wiki
git clone https://github.com/paritytech/parity-config-generator
Comment thread
TriplEight marked this conversation as resolved.
}

build_docs() {
Expand All @@ -15,18 +16,25 @@ build_docs() {
npm run build:markdown
}

build_config() {
echo "_______Build config docs______"
yarn install
AUTOGENSCRIPT=1 yarn generate-docs
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

to make it easier to debug, each commit to this branch goes compiling, and you can check the result here: https://gitlab.parity.io/parity/parity-ethereum/pipelines

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

also,

  • the parity/rust:gitlab-ci docker image (aka default) was updated with yarn installation on master branch,
  • .gitlab-ci was updated for debugging purposes only:
  • runner was changed from shell to docker (ci2)
  • running priority was changed to optional
    all of it should be corrected before merging

}

update_wiki_docs() {
echo "__________Update WIKI docs__________"
for file in $(ls jsonrpc/docs); do
module_name=${file:0:-3}
mv jsonrpc/docs/$file wiki/JSONRPC-$module_name-module.md
done
mv parity-config-generator/docs/config.md wiki/Configuring-Parity-Ethereum.md
}

setup_git() {
echo "__________Set github__________"
git config user.email "devops@parity.com"
git config user.name "Devops Parity"
git config --global user.email "devops@parity.com"
git config --global user.name "Devops Parity"
}

set_remote_wiki() {
Expand All @@ -38,13 +46,13 @@ commit_files() {
git checkout -b rpcdoc-update-${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}
git add .
git commit -m "Update docs to ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
git tag -a "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" -m "Update RPC docs to ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
git tag -a -f "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" -m "Update RPC and config docs to ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
}

upload_files() {
echo "__________Upload files__________"
git push origin HEAD
git push --tags
git push -q origin HEAD
git push -q -f --tags
}

RPC_TRAITS_DIR="rpc/src/v1/traits"
Expand All @@ -56,6 +64,9 @@ cp $RPC_TRAITS_DIR/*.rs "jsonrpc/.parity/$RPC_TRAITS_DIR"
cd jsonrpc
build_docs
cd ..
cd parity-config-generator
build_config
cd ..
update_wiki_docs
cd wiki
set_remote_wiki
Expand Down