Writerside Help

Build on TeamCity Cloud

This article describes how to use TeamCity Cloud to build a help instance.

  1. Create a new project on TeamCity from a repository URL.

  2. Open the project, click Edit project and select New build configuration.

  3. In the Create Build Configuration dialog, click Manually, then specify the name, ID, and an optional description for the build configuration.

    Click Create.

  4. Under General Settings, in the Artifacts paths field, specify the following:

    helproot => webhelp.zip
  5. Create VCS roots and specify VCS-specific settings. For more information, see the TeamCity help.

  6. 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"
  7. In the Run step within Docker container field, specify registry.jetbrains.team/p/writerside/builder/writerside-builder:241.15989.

    241.15989 is the latest Writerside builder Docker image tag.

  8. Click Save.

  9. 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/
  10. Under Parameters, add the following 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 module icon in the Project tool window.

    For example, the default module name in a starter project is Writerside and the instance ID is hi. So in this case, set the variable to Writerside/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 to webHelpHI2-all.zip.

    env.DOCKER_VERSION

    The version of the Writerside Docker builder to use for generating the documentation artifacts. The current latest version is 241.15989.

    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.

  11. 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 Artifact icon in TeamCity on the page that lists the builds.

Last modified: 23 May 2024