Configure a job - Fluid Topics - Latest

Fluid Topics Publisher (ftpub)

Category
Technical Notes
Audience
public
Version
Latest

After defining the required parameters, the next step is to configure a job that collects the documentation from of sub-tree of the project.

For most use cases, it is possible to use the following command to collect and publish simultaneously:

publish:
    stage: publish-documentation
    image: fluidtopics/publish
    script:
        - ftpub publish ${CI_PROJECT_DIR}/documentation/ ${FT_PORTAL_URL} -a ${FT_API_KEY} -s ${FT_SOURCE_ID}
    only: 
        - main

For certain use cases (to print logs, for example), it is possible to use the following command to collect and publish separately as follows:

collect-and-publish:
    stage: publish-documentation
    image: fluidtopics/publish
    script:
        - ftpub collect -o ${CI_PROJECT_DIR}/project-doc.zip ${CI_PROJECT_DIR}/documentation
        - ftpub publish ${CI_PROJECT_DIR}/project-doc.zip ${FT_PORTAL_URL} -a ${FT_API_KEY} -s ${FT_SOURCE_ID}
    artifacts:
        paths:
            - ${CI_PROJECT_DIR}/project-doc.zip
    only: 
        - main

It is necessary to use the Docker image for the ftpub tool in the job.