-
Notifications
You must be signed in to change notification settings - Fork 5
mostly moving files around + fix the sporadic job cancelling #147
Conversation
@@ -0,0 +1,125 @@ | |||
import assert from "assert" |
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.
moved from bot.ts
@@ -0,0 +1,49 @@ | |||
import { Probot } from "probot" |
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.
moved from bot.ts
@@ -0,0 +1,35 @@ | |||
import { EmitterWebhookEventName } from "@octokit/webhooks/dist-types/types" |
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.
moved from bot.ts
`git clone --progress --verbose --depth 1 ${ | ||
withRef ? `--branch "$PIPELINE_SCRIPTS_REF"` : "" | ||
} "$PIPELINE_SCRIPTS_REPOSITORY" "$PIPELINE_SCRIPTS_DIR"` | ||
function getCiBranchName(task: Task): string { |
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 actually fixes the sporadic cancelling
@@ -172,68 +180,6 @@ export const runCommandInGitlabPipeline = async (ctx: Context, task: Task): Prom | |||
return getAliveTaskGitlabContext(ctx, { id: pipeline.id, projectId: pipeline.project_id, jobWebUrl: job.web_url }) | |||
} | |||
|
|||
export function getGitlabCiYmlConfig( |
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.
moved to its own file
import { PullRequestError } from "src/types" | ||
import { getLines } from "src/utils" | ||
|
||
export const onIssueCommentCreated: WebhookHandler<"issue_comment.created"> = async (ctx, octokit, payload) => { |
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.
moved from bot.ts
gcc \ | ||
python3-dev \ | ||
libc-dev && \ | ||
apt-get autoremove -y |
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 all can fit nicely into the base image, having a separate CI image doesn't make much sense anymore
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.
@alvicsam recommended to leave as is, he will clean this up in https://github.com/paritytech/ci_cd/issues/690 💪
@@ -10,6 +10,7 @@ import { CmdJson } from "src/schema/schema.cmd" | |||
import { CommandRunner } from "src/shell" | |||
import { CommandConfigs } from "src/types" | |||
|
|||
export const PIPELINE_SCRIPTS_REF = "PIPELINE_SCRIPTS_REF" |
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.
What does this do?
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.
just having a constant (for autocomplete) vs hardcoding as string
Co-authored-by: Yuri Volkov <[email protected]> Signed-off-by: Maksym Hlukhovtsov <[email protected]>
the reason was: when you run few commands with one comment (https://github.com/paritytech-stg/polkadot/pull/2#issuecomment-1372914387), it was too quick force pushing the new gitlab-ci.yml config to the same branch, so the gitlab pipeline didn't have a time to read&start a pipeline, while it was already overridden by next command
Now jobs are set in queue as they should having the task ID as variation additionally to the PR number