Build on TeamCity Cloud
This article describes how to use TeamCity Cloud to build a help instance.
Create a new project on TeamCity from a repository URL.
Open the project, click Edit project and select New build configuration.
In the Create Build Configuration dialog, click Manually, then specify the name, ID, and an optional description for the build configuration.
Click Create.
Under General Settings, in the Artifacts paths field, specify the following:
helproot => webhelp.zipCreate VCS roots and specify VCS-specific settings. For more information, see the TeamCity help.
In the Build Steps section, add a new build step with the type Command line and the following script content that creates the output artifact as a ZIP archive:
set -e export DISPLAY=:99 Xvfb $DISPLAY & sleep 1 /opt/builder/bin/idea.sh helpbuilderinspect -source-dir . -product $INSTANCE -output-dir artifacts/ echo "Test existing of $ARTIFACT artifact" test -e artifacts/$ARTIFACT echo "$ARTIFACT exists"In the Run step within Docker container field, specify
registry.jetbrains.team/p/writerside/builder/writerside-builder:242.21870
.242.21870 is the latest Writerside builder Docker image tag.
Click Save.
Add one more build step with the type Command line and the following script content that extracts the produced ZIP archive:
ls -lR mkdir -p helproot/img/ echo "Unzip artifact to shared folder" python3 -m zipfile -e artifacts/$ARTIFACT helproot/Under Parameters, add the following environment variables:
If necessary, set the correct values for environment variables:
- env.INSTANCE
The name of the module and instance ID separated by a slash. The module name is the directory with writerside.cfg. It is designated by the icon in the Project tool window.
For example, the default module name in a starter project is
Writerside
and the instance ID ishi
. So in this case, set the variable toWriterside/hi
.- env.ARTIFACT
The name of the archive produced by the Writerside builder is webHelpXX2-all.zip, where XX is the ID of the instance in capital letters.
For example, if the instance name is Help Instance and its ID is
hi
, then set this variable towebHelpHI2-all.zip
.- env.DOCKER_VERSION
The version of the Writerside Docker builder to use for generating the documentation artifacts. The current latest version is 242.21870.
When you update to a newer version of Writerside, set the new Docker builder version to ensure results similar to what you see in the local preview and local builds.
When the build configuration is ready, run it and check the results.
There may be some warnings in the build log, which are expected and produced by the underlying IntelliJ platform. They do not affect the built documentation, so you can ignore them if the build finishes successfully.
To find the built artifact, go to the Artifacts tab of the build results page or use the artifacts icon on the page that lists the builds.