opendevstack / opendevstack/ods-quickstarters

Provide new "upgrade existing repo to ODS" quickstarter

Open
#284 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue question
Dominant language
Shell
Stars
39
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
Assuming you have your code somewhere version controlled, there is quite some manual steps one needs to do to get it into ODS. Namely:

  1. pick any quickstarter in prov app (gets you jenkinsfile / sq and ocp resources)
  2. clone / clean the created sources
  3. add new remote and merge existing code

The reason why this is not (really) working today is 3 fold:

  1. Provision app will fail if the repo already exists (https://github.com/opendevstack/ods-provisioning-app/blob/2b3773f77dcebed5b3388598020053365e67d5e7/src/main/java/org/opendevstack/provision/services/BitbucketAdapter.java#L587)
  2. PushToRepo stage contains the upgrade magic in case the repo is already filled with state (https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/src/org/ods/quickstarter/PushToRemoteStage.groovy)
  3. CopyFilesStage (https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/src/org/ods/quickstarter/CopyFilesStage.groovy#L13) - does a (blind) copy of quickstarter files, w/o checking if they already exist - so in case a jenkinsfile exists, it will fail ..

I want to solicit feedback on this first - to see what we could do ... my proposal would be to create

  1. a new quickstarter (sort of based on the docker-plain) with checks on what's already in the repo - and adds jenkinsfile / sq props and also ocp resources .. .
  2. add a check into the prov app if this new quickstarter is used, that the repo must already exist, and we only add roles / webhook proxy ...

@torstenhe @michaelsauter

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the referenced BitbucketAdapter.java location in ods-provisioning-app, then PushToRemoteStage.groovy and CopyFilesStage.groovy in ods-jenkins-shared-library. Compare their existing-repository behavior with the proposed docker-plain-based quickstarter and identify the expected provisioning and file-copy outcomes. Done requires an agreed design for the new quickstarter and Provision app behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
ci-cd, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.