Workers subcommands
The arkindex worker command contains one import subcommand to help you add new workers and worker versions to Arkindex.
arkindex worker import imports workers using the newer worker configuration format, with one worker per file. The command will look for files within the arkindex/ directory with .yml or .yaml file extensions.
This command will create new worker versions on Arkindex for all workers defined in the configuration files. If a worker version already exists for this revision, the command may update its tag and branch. The worker for each worker version may also be created or updated.
|
The To migrate existing workers to the new configuration format, a migration guide is available. The |
Usage
arkindex worker import registry.gitlab.example.com/my_group/my_worker:0.4.2
The only required argument is a Docker image reference for the new worker version.
Optional arguments
If none of the additional arguments are set, their value is deduced from the local Git repository the command is launched from.
--repository-url-
The URL of the worker’s Git repository. If unset, the command assumes it is being launched from the Git repository containing the worker, and uses the URL of this local repository.
arkindex worker import registry.gitlab.example.com/my_group/my_worker:0.4.2 \ --repository-url http://gitlab.example.com/my_group/my_worker --revision-branch-
The name of a branch to assign to the Git revision. If unset, the command assumes it is being launched from the Git repository containing the worker, and retrieves the branch from this local repository.
arkindex worker import registry.gitlab.example.com/my_group/my_worker:0.4.2 \ --revision-branch 'something-something-branch' --revision-tag-
The tag to assign to the Git revision. If unset, the command assumes it is being launched from the Git repository containing the worker, and retrieves the first tag it finds in this local repository.
arkindex worker import registry.gitlab.example.com/my_group/my_worker:0.4.2 \ --revision-tag 0.4.2
Running the command in a Gitlab CI pipeline
When either subcommand is launched from a Gitlab pipeline, then any missing values are retrieved from their corresponding environment variables.
| Command argument | Environment variable |
|---|---|
|
|
|
|
|
|