Skip to content
Snippets Groups Projects
Commit 8d6f4b69 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Document worker publication

parent eb18f504
No related branches found
No related tags found
1 merge request!484Document worker publication
Pipeline #154123 passed
# Publishing your worker on Arkindex
## Publication process
While workers may be [run locally](./run-local.md), they are usually written to launch on an Arkindex instance. A worker version on Arkindex is basically a configuration and an URL towards a Docker image, used at runtime during processes. The worker [template](./template-structure.md) includes an automatic publication process towards any Arkindex instance.
## How it works
The template implements a new CI job, `publish-worker`, at the last stage of the pipeline. When every job of the previous stages have passed, this one will try to publish a new worker version, using the newly built Docker image, on every Arkindex instance specified by the `ARKINDEX_INSTANCE` variable. The publication is done using the [Arkindex CLI tool](<https://cli.arkindex.org/workers/#publish-workers>).
!!! warning
If you change the `docker_image_tag` positional argument value, it might not be in sync with the tag produced during the `docker-build` job. Make sure these match to link the version with the right Docker image.
!!! note
If your repository defines multiple workers, one worker version will be pushed per worker. However, there will still only be one job per instance.
## Authentication in CI
Since the publication is done during a GitLab CI, no optional arguments are [needed](<https://cli.arkindex.org/workers/#running-the-command-in-a-gitlab-ci-pipeline>). There are multiple ways to authenticate to an Arkindex instance when using the CLI tool. During a GitLab CI, the best way is through a [Project-level Secure File](<https://docs.gitlab.com/ee/ci/secure_files/>). Make sure to create one that follows the format [supported by the CLI](<https://cli.arkindex.org/login/#gitlab-secure-file>). The template expects that secure file to be named `arkindex-cli.yaml`.
## Specifying another instance
In the template, a publication to <https://demo.arkindex.org> (slug `demo`) is presented. To publish to another instance, make sure that:
- the authentication credentials for that instance are present in the secure file,
- the slug is listed as a potential value for `ARKINDEX_INSTANCE` in the `publish-worker` job configuration.
......@@ -64,6 +64,7 @@ nav:
- contents/workers/index.md
- Setting up a new worker: contents/workers/create.md
- Running your worker locally: contents/workers/run-local.md
- Publishing your worker on Arkindex: contents/workers/publication.md
- Maintaining a worker: contents/workers/maintenance.md
- GitLab CI for workers: contents/workers/ci/index.md
- YAML configuration: contents/workers/yaml.md
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment