Open mohamedghozzi-lw opened 4 years ago
It sounds like there are a two different questions here, how to add the syncRepo and how to connect a CI job to an Assembly Line.
Issues 1 and 3 relate to making sure that an Assembly Line can connect to a particular CI job. Another way to tell if a CI project is an older project that hasn't yet been updated to run in Assembly Lines is by the format of the name on the subscription dashboard. If the name shown in the table includes the subscription name, then that project has not yet been updated, won't be visible in Assembly Lines, and should have a "hook" button in the second-to-last panel of the project settings. If the name shown doesn't include the subscription name, it has already been updated and you should be able to add it to Assembly Lines as described in http://docs.shippable.com/platform/workflow/job/runci/.
Directions to add a syncRepo are available here: http://docs.shippable.com/platform/tutorial/workflow/add-assembly-line/ You will need to have a subscription integration that has admin access to the repository in order to be able to create webhooks. This means a subscription integration that links to the SCM account integration of an account that is able to see the webhooks list on the source provider.
@a-murphy Thank you for your response!
Now I am trying add a 'runSh' job following the completion of the CI job. I added this section to the shippable.yml file:
jobs:
The CI section of the shippable.yml builds the agent and completes successfully but the runSh job is never triggered. Based on my understating of the documentation, adding the job to the YAML file is all what is needed in my case. Please help me understand what I am missing.
The only reason I tried to add it is following the comment https://github.com/Shippable/support/issues/3778#issuecomment-323807269
Assembly Lines are defined in syncRepos, so, in order to add a runSh job, you'll need to add the repository containing the runSh definition as a syncRepo.
@a-murphy - I think we're hitting a permissions isssue with the existing GitHub API token key but I don't know how to confirm the permissions for this API token in GitHub.
I can create a new personal access token but I'm not clear which permissions bits in GitHub need to be enabled. Guidance or a pointer to a doc I'm missing?
The GitHub scope to enable webhooks is admin:repo_hook
and it would also need repo
to see private repositories. However, GitHub integrations are expected to be OAuth tokens and I can't be sure if future webhooks would trigger a syncRepo sync correctly with a personal access token. Typically, SCM integrations are added to a subscription by selecting the "use an account integration" option and selecting the OAuth SCM integration created by logging into Shippable as that account. Creating a GitHub account to use for integrations allows the repositories accessible through the integration to be controlled.
Description of your issue:
I am trying to create a job that executes once CI jobs are finished. It is something similar to what is described here: https://github.com/Shippable/support/issues/3778
Issues: 1) I do not see the Hook under Project Actions -> Connect Pipelines 2) I tried to add the syncRepo as note here https://github.com/Shippable/support/issues/3778#issuecomment-323807269
I get a popup error "Please make sure subscription integration used to add syncRepo has admin access on project: xxxxxxxxxxxx
I am trying to import the YAML file with CI section and jobs section in a single file on our github repo
3) Under SPOG, I do not see my project ciRepo and runCI objects.
Please let me know what needs to be done to add the job. Thanks!