New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
circleci commandSet #217
circleci commandSet #217
Conversation
5169011
to
1b988c1
Compare
seems like this command-set not following the nimbella project structure. this should be the structure of folders/files
|
circleci/commands.yaml
Outdated
@@ -0,0 +1,9 @@ | |||
sourceBasePath: https://raw.githubusercontent.com/nimbella/command-sets/master/circleci/src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceBasePath
and sourcePath
not required. these are deprecated.
Suggested updates to the docs. Apparently I had not “submitted” the review. |
This secret should be created with the following naming convention. `projectName_token`. Where the project name is your circleCi project name. example `webApp_token`. | ||
|
||
`vcsType` - Version Control System. Either `gh` for GitHub or `bb` BitBucket. | ||
`orgName` - Name of your gh/bb organisation specify the account username if its a personal project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of you GitHub or BitBucket organization. Specify your account username if it is a personal project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the org name also be optional. If not specified then the commands must include it when run.
These are : | ||
`projectToken` - CircleCI allows you to create a Token on a project basis to access API, Make sure you provide the token here which can access all those branches which you want to use via this command. | ||
|
||
This secret should be created with the following naming convention. `projectName_token`. Where the project name is your circleCi project name. example `webApp_token`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn’t required though - so this is a tip? I think once you have the api token what it’s actually called in the circle dashboard isn’t important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, What it’s actually called in the circle dashboard isn’t important but it's easy for user to remember the name, and based on the name we can send the specific token in the request.
The reason behind projectName_token
is, let's say we have 2 projects in CCI commander
and main
.
So, I have created 2 API access tokens 1 for each.
Now, I want to run a workflow for commander
first and then for main
. This, I would have to pass as a command parameter, and based on that program can check for the token as all the secrets are available to all the commands present inside same app.
/nc circleci_workflow_run commander develop -> commander_token
/nc circleci_workflow_run main develop -> main_token
circleci_workflow_run
-> Trigger workflow for default branch or provided branch based on the access token provided.In case, Token does not have access to the specified branch. The default branch workflow will be triggered as API doesn't return an error in that case.
circleci_workflow_list
-> Provides with the list of last 5 workflow runs.