OCDS documentation¶
Add a new language¶
In
salt/apache/files/sites/docs.conf.include, add the new language in theoptionsvariable.In
tests/test_docs.py, update thelanguagesvariable.
Add a new minor version¶
Below, substitute {root}, {current-minor-branch} and {old-minor-branch}. For example: ppp, 1.1 and 1.0.
Edit
salt/apache/files/docs/robots.txtIf the profile has a version, add:
Disallow: /profiles/{root}/{current-minor-branch}If the profile has older minor versions, also add, for each old minor version:
Disallow: /profiles/{root}/{old-minor-branch}
Publish draft documentation¶
To configure a documentation repository to push builds to the server:
Access the repository’s Settings tab
Click Secret and variables
Click Actions
Set the private key:
Click New repository secret
Set Name to “PRIVATE_KEY”
Set Value to the contents of
salt/private/keys/docs_ciClick Add secret
Set the Elasticsearch password:
Click New repository secret
Set Name to “ELASTICSEARCH_PASSWORD”
Set Value to the password of the
manageuser in thepillar/private/docs.slsfileClick Add secret
Publish released documentation¶
Follow the OCDS Development Handbook’s deployment guide.
1. Update this repository¶
Note
You can skip this step if you are not releasing a new major, minor or patch version.
Below, substitute {root}, {latest-branch}, {dev-branch}, {formatted-dev-branch}, {version} and {name}. For example: ppp, latest, 1.0-dev, 1.0 Dev, 1.0.0.beta and OCDS for PPPs.
If this is the first numbered version of a profile:
In
salt/apache/files/sites/docs.conf.include, add the profile’s latest branch, minor series and languages in theoptionsvariable.In
tests/test_docs.py, update theversions,languagesandbanner_livevariables.Add a
salt/docs/includes/version-options-profiles-{root}.htmlfile to this repository:<option>Version</option> <option value="{latest-branch}">{version} ({latest-branch})</option>
Add a
salt/docs/includes/banner_staging_profiles_{root}.htmlfile to this repository:<div class="oc-fixed-alert-header"> This is a development copy of the {name} docs, the <a href="/profiles/{root}/{latest-branch}/en/">latest live version is here</a>. </div>
Otherwise:
In the appropriate
salt/docs/includes/version-options*.htmlfile, update the version number in the text of the firstoptionelement.
If this is a new major or minor version:
In
salt/docs/robots.txt, disallow the minor branch and its dev branch, for example:Disallow: /1.2 Disallow: /1.2-dev
In
salt/apache/files/sites/docs.conf.include, add the minor series in theoptionsvariable, and add a newLocationdirective like:<Location /1.1/> SetEnv BANNER /includes/banner_old.html </Location>
In
ocdsindex-exclude.txt, add the base URL of the new version.In
tests/test_docs.py, update theversions,banner_liveandbanner_oldvariables.In the appropriate
salt/docs/includes/banner_staging*.htmlfile andsalt/docs/includes/banner_old*.html>file (if any), update the minor series.In the appropriate
salt/docs/includes/version-options*.htmlfile, add anoptionelement to the “Live”optgroupfor the previous minor series and previous version number, for example:<option value="0.9">0.9.2</option>
2. Update other repositories¶
Update the Data Review Tool and any other tools per this spreadsheet.
Migrate from an old server¶
Copy the
/home/ocds-docs/webdirectory. For example:rsync -avz ocp99:/home/ocds-docs/web/ /home/ocds-docs/web/
Stop Elasticsearch, replace the
/var/lib/elasticsearch/directory, and start Elasticsearch. For example:systemctl stop elasticsearch rm -rf /var/lib/elasticsearch/* rsync -avz ocp99:/var/lib/elasticsearch/ /var/lib/elasticsearch/ systemctl start elasticsearch
Mark the
elasticsearchpackage as held back:apt-mark hold elasticsearch
Replace the hostname (
ocp##.open-contracting.org) and public key indeploy-docs.sh.Replace the hostname in
ci-profile.ymlin the .github repository.