Skip to content
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

Provide Pipeline Synchronizer to synchronize PipelineRun from Jenkins #244

Merged
merged 4 commits into from
Sep 22, 2021

Conversation

JohnNiang
Copy link
Member

@JohnNiang JohnNiang commented Sep 18, 2021

What this PR dose

Provide Pipeline Synchronizer to synchronize PipelineRun from Jenkins.

Why we need it

After we've done #41, we will missing some Jenkins runs which are triggered automatically or old data. So we need a synchronizer to ensure that we can convert them into PipelineRun.

Special notes

This is the final effect:

7b3d61a2630705ca6da5611519da075

Steps to test

Replace the docker image of devops-apiserver and devops-controller with johnniang/devops-apiserver:pipelinerun-syncer and johnniang/devops-controller:pipelinerun-syncer respectively.

/kind feature

@ks-ci-bot ks-ci-bot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 18, 2021
@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JohnNiang
To complete the pull request process, please assign linuxsuren after the PR has been reviewed.
You can assign the PR to them by writing /assign @linuxsuren in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 18, 2021
@codecov
Copy link

codecov bot commented Sep 18, 2021

Codecov Report

Merging #244 (a4bb0a8) into master (f1c3c10) will increase coverage by 0.14%.
The diff coverage is 20.95%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #244      +/-   ##
=========================================
+ Coverage    7.31%   7.45%   +0.14%     
=========================================
  Files          83      84       +1     
  Lines       21166   21261      +95     
=========================================
+ Hits         1548    1585      +37     
- Misses      19493   19552      +59     
+ Partials      125     124       -1     
Flag Coverage Δ
unittests 7.45% <20.95%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...trollers/devopsproject/devopsproject_controller.go 43.22% <ø> (+2.81%) ⬆️
...lers/jenkins/pipelinerun/pipelinerun_controller.go 16.31% <0.00%> (-0.09%) ⬇️
controllers/jenkins/pipelinerun/utils.go 100.00% <ø> (ø)
controllers/pipeline/pipeline_controller.go 38.23% <0.00%> (-0.58%) ⬇️
pkg/kapis/devops/v1alpha3/pipelinerun/handler.go 0.00% <0.00%> (ø)
pkg/kapis/devops/v1alpha3/pipelinerun/util.go 40.00% <0.00%> (-0.82%) ⬇️
...rs/jenkins/pipelinerun/pipelinerun_synchronizer.go 28.57% <28.57%> (ø)
...rs/devopscredential/devopscredential_controller.go 36.48% <0.00%> (+3.37%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1c3c10...a4bb0a8. Read the comment docs.

@JohnNiang JohnNiang force-pushed the feat/sync-pipelinrun branch 2 times, most recently from b8ea06b to 1882dd7 Compare September 18, 2021 09:51
@JohnNiang JohnNiang changed the title WIP: Provide Pipeline Synchronizer to synchronize PipelineRun from Jenkins Provide Pipeline Synchronizer to synchronize PipelineRun from Jenkins Sep 18, 2021
@ks-ci-bot ks-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 18, 2021
Refine reconciler logger initialization and event reason

Tidy go mod

Signed-off-by: johnniang <johnniang@fastmail.com>

Refine PipelineRun synchronizer

Tidy go mod

Signed-off-by: johnniang <johnniang@fastmail.com>
@ks-ci-bot ks-ci-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 22, 2021
Copy link
Member

@LinuxSuRen LinuxSuRen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 22, 2021
@LinuxSuRen LinuxSuRen merged commit 525ec52 into kubesphere:master Sep 22, 2021
@JohnNiang JohnNiang deleted the feat/sync-pipelinrun branch September 22, 2021 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants