Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.
This repository was archived by the owner on Jun 14, 2019. It is now read-only.

Have canonical inputs to config.json that can be overriden #17

Closed

Description

@smarterclayton

config.json takes a number of input images (that today must come from a cluster)

{
  "tag_specification": {
    "namespace": "openshift",
    "name": "origin-v3.10",
    "tag": "",
    "tag_overrides": {}
  },
  "base_rpm_images": [
    {
      "namespace": "openshift",
      "name": "origin-v3.10",
      "tag": "base",
      "as": "base"
    }
  ],
  "test_base_image": {
    "namespace": "ci",
    "name": "release-with-clonerefs",
    "tag": "golang-1.9"
  },

These are all details of the particular cluster a job is run against, not a detail about the project itself. each of these steps results in something being tagged into either stable or pipeline with a short name (which must be unique).

I think the canonical form of these should either be in the dockerfiles themselves or as regular docker image references (docker.io/openshift/origin-base:v3.10) where the CI system can override them by name (use namespace openshift name origin-v3.10 as 'base') and a local developer running CI operator against an arbitrary cluster can see it simply work.

Suggested change:

  1. change base_rpm_images and test_base_image to be something a bit more generic:
{
  "images": {
    "test-base": {"image": "docker.io/openshift/origin-release:golang-1.9"},
    "base": {"image": "docker.io/openshift/origin-base:latest"} 
  },
  "tag_specification": {
     "cluster": "api.ci.openshift.org",
    "namespace": "openshift",
    "name": "origin-v3.10"
  },
}

which can also be overridden via command line flag --images:

... --images="$( cat images.json )"
$ cat images.json
{
  "images": {
    "test-base": {"namespace": "ci", "name": "release-with-clonerefs", "tag": "golang-1.9"},
    "base": {"namespace": "openshift", "origin-v3.10", "tag": "base"},
  },
  "tag_specification": {
    "namespace": "openshift",
    "name": "origin-v3.10",
    "tag": "",
    "tag_overrides": {}
  },
}

The CI system would selective override images and tag specification. The end user would be able to run ci-operator locally.

Activity

  1. smarterclayton commented on May 16, 2018

    @smarterclayton
    ContributorAuthor
  2. smarterclayton commented on May 16, 2018

    @smarterclayton
    ContributorAuthor

    If we did this then we can move config.json into the hosting repo and ci-operator would work against that repo raw.

  3. 0xmichalis commented on May 17, 2018

    @0xmichalis
    Contributor

    sgtm

  4. smarterclayton commented on May 18, 2018

    @smarterclayton
    ContributorAuthor

    Another thing we could do - job spec should probably have a canonical definition and we could probably look that up in the current repo (when ci-operator is executing in a repo). In the future we could do local builds by building the src image ourself:

    $ ci-operator --local --namespace=claytons-ns
    

    --local would check for the local config.json, check if we are in a git repo, and create the src image for us based on local content, then run the rest of the steps the same. Would make local iteration easier.

  5. smarterclayton commented on May 20, 2018

    @smarterclayton
    ContributorAuthor

    opened #20 as the basics of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions