jenkins-x-plugins / jx-pipeline

a small binary plugin for working with Jenkins X pipelines
Apache License 2.0
8 stars 25 forks source link

fix: custom envs to spec template #510

Closed ba11b0y closed 1 year ago

ba11b0y commented 1 year ago

Fixes https://github.com/jenkins-x/jx/issues/8419

Signed-off-by: Rahul Tiwari jprrahultiwari@gmail.com

jenkins-x-bot commented 1 year ago

Hi @ba11b0y. Thanks for your PR.

I'm waiting for a jenkins-x-plugins or todo member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [jenkins-x/lighthouse](https://github.com/jenkins-x/lighthouse/issues/new?title=Command%20issue:) repository.
ba11b0y commented 1 year ago

@msvticket Wanted to know the answers to these questions before marking this as ready for review:

ba11b0y commented 1 year ago

/assign @msvticket

msvticket commented 1 year ago

@msvticket Wanted to know the answers to these questions before marking this as ready for review:

* Should the environment variables be added to all the tasks? Right now I'm adding the environment variable to each task [here](https://github.com/jenkins-x-plugins/jx-pipeline/pull/510/files#diff-ae229fbd6b01ded5fab0e20b063bd9ce498c0f5c0ece1202648e2f94a2ece081R547)

Yes

* In this case what should be the source of the env var? Ref: https://github.com/jenkins-x-plugins/jx-pipeline/pull/510/files#diff-ae229fbd6b01ded5fab0e20b063bd9ce498c0f5c0ece1202648e2f94a2ece081R551

Nothing. You specify either value or valueFrom, which is documented in EnvVar.

ba11b0y commented 1 year ago

Thanks! @msvticket Can you review this please?

PS: Happy New Year! 🎉

msvticket commented 1 year ago

/ok-to-test

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 92.85% and project coverage change: -1.59% :warning:

Comparison is base (541b272) 39.07% compared to head (e7f5dbd) 37.48%.

:exclamation: Current head e7f5dbd differs from pull request most recent head 05fc234. Consider uploading reports for the commit 05fc234 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #510 +/- ## ========================================== - Coverage 39.07% 37.48% -1.59% ========================================== Files 49 44 -5 Lines 6391 5959 -432 ========================================== - Hits 2497 2234 -263 + Misses 3531 3382 -149 + Partials 363 343 -20 ``` | [Files Changed](https://app.codecov.io/gh/jenkins-x-plugins/jx-pipeline/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jenkins-x-plugins) | Coverage Δ | | |---|---|---| | [pkg/cmd/effective/effective.go](https://app.codecov.io/gh/jenkins-x-plugins/jx-pipeline/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jenkins-x-plugins#diff-cGtnL2NtZC9lZmZlY3RpdmUvZWZmZWN0aXZlLmdv) | `42.28% <0.00%> (ø)` | | | [pkg/pipelines/processor/inliner.go](https://app.codecov.io/gh/jenkins-x-plugins/jx-pipeline/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jenkins-x-plugins#diff-cGtnL3BpcGVsaW5lcy9wcm9jZXNzb3IvaW5saW5lci5nbw==) | `48.00% <ø> (-4.75%)` | :arrow_down: | | [pkg/cmd/start/start.go](https://app.codecov.io/gh/jenkins-x-plugins/jx-pipeline/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jenkins-x-plugins#diff-cGtnL2NtZC9zdGFydC9zdGFydC5nbw==) | `64.67% <100.00%> (+1.04%)` | :arrow_up: | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/jenkins-x-plugins/jx-pipeline/pull/510/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jenkins-x-plugins)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ba11b0y commented 1 year ago

@msvticket lint and codecov seems to be good now. Can you re-review this please?

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

jenkins-x-bot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msvticket

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/jenkins-x-plugins/jx-pipeline/blob/main/OWNERS)~~ [msvticket] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
5.6% 5.6% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

msvticket commented 1 year ago

There was a small error in the test that I took the liberty to fix and while at it I squashed the commits

ba11b0y commented 1 year ago

Thanks! @msvticket