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

"DRY violations" with the TsscPipeline CR: Config/Helm repo #134

Closed
hatmarch opened this issue Feb 11, 2021 · 3 comments
Closed

"DRY violations" with the TsscPipeline CR: Config/Helm repo #134

hatmarch opened this issue Feb 11, 2021 · 3 comments

Comments

@hatmarch
Copy link

(related to #133)

There are some "don't repeat yourself" / brittle double coding issues when defining a software pipeline (for jenkins, but this probably applies to any pipeline).

Consider the attached TsscPipeline resource. As coded it will run into an issue since the name of the pipeline's config repo COMES FROM THE PLATFORMS config.yml configmap (see deployment-config-repo line here).

There should not be this kind of tight (and transparent) coupling between the Pipeline CR and the Platform CR.

BUG: The deploy step(runner) in the pipeline fails with:

Error deploying to environment '
                                                       '(TEST): Error cloning repository '
                                                       '(http://gitea.devsecops.svc.cluster.local:3000/platform/reference-quarkus-mvn-cloud-resources_jenkins_workflow-standard.git): \n'

With Ploigos operator 0.2.2 and Ploigos jenkins library 0.17.0

EXPECTED: Pipeline attempts to clone the repo specified in destinationRepoName in the pipeline CR, in this case upstream-reference-app-config

tsscpipeline-tsscpipeline-jenkins-issue-git.yaml.zip

@hatmarch
Copy link
Author

I would assume that at minimum the Platform should not be specifying a helm/config repo at the platform level in its platform config map. If however the config repo must ALWAYS be called that, then this should not be made available to the user via the TsscPipeline CR.

See also my comments in #133

@hatmarch
Copy link
Author

@andykrohg considering the thread in the ploigos gchat, I would think at minimum the platform operator should not specify both the gitserver and the repo (url) as this is not a sensible default.

If we're going to "leave it to the devs" then that should be a value that is blank and must be provided in the ploigos config of the project of the pipeline. Ideally the pipeline would error out early if there is no deploy git repo specified

@andykrohg
Copy link
Collaborator

Sorted this out @hatmarch it never occurred to me to simply specify http://gitea:3000 as the git server url in the reference app, so we don't need to know the TsscPlatform's namespace to construct the url for the helm repo. I removed the platform-level property in v0.2.7 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants