I am trying to write my first ORB using gitlab as my VCS but the pipeline fails with the following message:
Error calling workflow: 'lint-pack'
Error calling job: 'orb-tools/continue'
Type error for argument vcs_type: expected type: enum ("gh" "github" "bb" "bitbucket"), actual value: "circleci" (type string)
The vcs_type is declared as shown below:
vcs_type: << pipeline.project.type >>
Any pointers what I am doing wrong?
If youâre only using gitlab, does it work to set it explicitly to gitlab
? Can you include a little more of the context of what youâre using it for or why you need it to be set in the orb?
Apparently if you are using Gitlab, the type is defined as circleci. But looks like the ORB doesnât have that in the enum list. I also read that if Gitlab is the SCM then it uses Github App for authentication. I am not sure what that means.
The fix was to hard code the type to âGithubâ
1 Like
For those encountering the error:
Error calling workflow: âlint-packâ
Error calling job: âorb-tools/continueâ
Type error for argument vcs_type: expected type: enum (âghâ âgithubâ âbbâ âbitbucketâ), actual value: âcircleciâ
This occurs because youâre using a CircleCI-native organization (which returns vcs_type: âcircleciâ), but the orb-tools orb currently only supports traditional VCS types (âghâ, âgithubâ, âbbâ, âbitbucketâ).
Quick Fix:
In your .circleci/config.yml, hardcode the vcs_type to âgithubâ:
pipeline_number: << pipeline.number >>
vcs_type: github # Hardcode this instead of using << pipeline.project.type >>
Why this works:
-
Even though youâre using GitLab or CircleCI-native organization
-
The orb publishing process still uses GitHub App for authentication
-
Therefore, hardcoding vcs_type: github works as a temporary solution
This applies to both GitLab users and CircleCI-native organization users until the orb-tools orb is updated to support additional VCS types.
PS: You can see your VCS types here: https://circleci.com/api/v2/me/collaborations
Threw up feat(jobs): support `circleci` VCS type by wyardley ¡ Pull Request #248 ¡ CircleCI-Public/orb-tools-orb ¡ GitHub to add it as a valid type, though it wasnât super clear from the API docs what all the valid values are.