#20 More message types and examples for container-image artifacts
Merged 5 years ago by psss. Opened 5 years ago by rayson.
fedora-ci/ rayson/messages container-image-messages  into  master

@@ -0,0 +1,25 @@ 

+ {

+     "artifact": {

+       "type": "container-image",

+       "repository": "someapp",

+       "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

+       "nvr": "someapp-2.8.71-7.el7_4",

+       "issuer": "jenkins",

+       "scratch": true,

+       "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

+     },

+     "gate": {

+         "name": "Some Gating Bot",

+         "team": "Factory 2.0",

+         "docs": "https://somewhere.com/user-documentation",

+         "email": "someone@somewhere.com",

+         "irc": "#some-channel",

+         "environment": "production"

+     },

+     "summary": "1 of 1 required tests passed",

+     "decision": "go",

+     "decision_url": "https://datagrepper.somewhere.com/id?id=2018-21cc85d6",

+     "web_url": "https://dashboard.com/job/1234/",

+     "generated_at": "2018-05-10 08:58:31.222602",

+     "version": "0.1.0"

+ }

@@ -0,0 +1,24 @@ 

+ {

+     "artifact": {

+       "type": "container-image",

+       "repository": "someapp",

+       "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

+       "nvr": "someapp-2.8.71-7.el7_4",

+       "issuer": "jenkins",

+       "scratch": true,

+       "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

+     },

+     "gate": {

+         "name": "Some Gating Bot",

+         "team": "Factory 2.0",

+         "docs": "https://somewhere.com/user-documentation",

+         "email": "someone@somewhere.com",

+         "irc": "#some-channel",

+         "environment": "production"

+     },

+     "reason": "No test results available after 24 hours.",

+     "issue_url": "http://sentry.somewhere.com/baseos/production/issues/1149/",

+     "web_url": "https://dashboard.com/job/1234/",

+     "generated_at": "2018-05-10 08:58:31.222602",

+     "version": "0.1.0"

+ }

@@ -0,0 +1,22 @@ 

+ {

+     "artifact": {

+       "type": "container-image",

+       "repository": "someapp",

+       "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

+       "nvr": "someapp-2.8.71-7.el7_4",

+       "issuer": "jenkins",

+       "scratch": true,

+       "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

+     },

+     "gate": {

+         "name": "Some Gating Bot",

+         "team": "Factory 2.0",

+         "docs": "https://somewhere.com/user-documentation",

+         "email": "someone@somewhere.com",

+         "irc": "#some-channel",

+         "environment": "production"

+     },

+     "web_url": "https://dashboard.com/job/1234/",

+     "generated_at": "2018-05-10 08:58:31.222602",

+     "version": "0.1.0"

+ }

@@ -0,0 +1,22 @@ 

+ {

+     "artifact": {

+       "type": "container-image",

+       "repository": "someapp",

+       "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

+       "nvr": "someapp-2.8.71-7.el7_4",

+       "issuer": "jenkins",

+       "scratch": true,

+       "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

+     },

+     "gate": {

+         "name": "Some Gating Bot",

+         "team": "Factory 2.0",

+         "docs": "https://somewhere.com/user-documentation",

+         "email": "someone@somewhere.com",

+         "irc": "#some-channel",

+         "environment": "production"

+     },

+     "web_url": "https://dashboard.com/job/1234/",

+     "generated_at": "2018-05-10 08:58:31.222602",

+     "version": "0.1.0"

+ }

@@ -4,32 +4,30 @@ 

      "team": "DevOps",

      "url": "https://example.com",

      "docs": "https://example.com/user-documentation",

-     "irc": "#pnt-devops-dev",

-     "email": "pnt-devops-dev@example.com",

+     "irc": "#some-channel",

+     "email": "someone@example.com",

      "environment": "production"

    },

    "run": {

-     "url": "https://somewhere.com/job/ci-openstack/4794",

-     "log": "https://somewhere.com/job/ci-openstack/4794/console",

-     "debug": "https://somewhere.com/job/ci-openstack/4794/artifacts/debug.txt",

-     "rebuild": "https://somewhere.com/job/ci-openstack/4794/rebuild/parametrized"

+     "url": "https://somewhere.com/job/ci-job/4794",

+     "log": "https://somewhere.com/job/ci-job/4794/console",

+     "debug": "https://somewhere.com/job/ci-job/4794/artifacts/debug.txt",

+     "rebuild": "https://somewhere.com/job/ci-job/4794/rebuild/parametrized"

    },

    "artifact": {

      "type": "container-image",

-     "repository": "fedora",

+     "repository": "someapp",

      "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

-     "nvr": "fedora:28",

-     "issuer": "yuxzhu",

+     "nvr": "someapp-2.8.71-7.el7_4",

+     "issuer": "jenkins",

      "scratch": true,

      "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

    },

    "system":

       [{

-         "os": "rhel-7.4-server-x86_64-updated",

-         "provider": "openstack",

-         "architecture": "x86_64",

-         "variant": "Server",

-         "label": "master"

+         "os": "docker.io/openshift/jenkins-slave-base-centos7:latest",

+         "provider": "openshift",

+         "architecture": "x86_64"

       }],

    "type": "tier1",

    "category": "functional",
@@ -37,7 +35,7 @@ 

    "xunit": "https://somewhere.com/job/ci-openstack/4794/artifacts/results.xml",

    "recipients": [ "ovasik", "mvadkert" ],

    "thread_id": "ac11dcddf99a",

-   "namespace": "baseos-qe.baseos-ci",

+   "namespace": "factory2.c3i-ci",

    "label": "fast",

    "web_url": "https://dashboard.com/job/4794/",

    "note": "Some notes.",

@@ -4,22 +4,22 @@ 

      "team": "DevOps",

      "url": "https://example.com",

      "docs": "https://example.com/user-documentation",

-     "irc": "#pnt-devops-dev",

-     "email": "pnt-devops-dev@example.com",

+     "irc": "#some-channel",

+     "email": "someone@example.com",

      "environment": "production"

    },

    "run": {

-     "url": "https://somewhere.com/job/ci-openstack/4794",

-     "log": "https://somewhere.com/job/ci-openstack/4794/console",

-     "debug": "https://somewhere.com/job/ci-openstack/4794/artifacts/debug.txt",

-     "rebuild": "https://somewhere.com/job/ci-openstack/4794/rebuild/parametrized"

+     "url": "https://somewhere.com/job/ci-job/4794",

+     "log": "https://somewhere.com/job/ci-job/4794/console",

+     "debug": "https://somewhere.com/job/ci-job/4794/artifacts/debug.txt",

+     "rebuild": "https://somewhere.com/job/ci-job/4794/rebuild/parametrized"

    },

    "artifact": {

      "type": "container-image",

-     "repository": "fedora",

+     "repository": "someapp",

      "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

-     "nvr": "fedora:28",

-     "issuer": "yuxzhu",

+     "nvr": "someapp-2.8.71-7.el7_4",

+     "issuer": "jenkins",

      "scratch": true,

      "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

    },
@@ -30,8 +30,8 @@ 

    "issue_url": "http://sentry.somewhere.com/baseos/production/issues/1149/",

    "recipients": [ "ovasik" ,"mvadkert" ],

    "thread_id": "fac11dcddf99a",

-   "note": "Operation team was notified about the issue, follow the Sentry issue link",

-   "namespace": "baseos-qe.baseos-ci",

+   "note": "Some notes.",

+   "namespace": "factory2.c3i-ci",

    "generated_at": "2018-05-10 08:58:31.222602",

    "version": "0.1.0"

  }

@@ -0,0 +1,30 @@ 

+ {

+   "ci": {

+     "name": "C3I Jenkins",

+     "team": "DevOps",

+     "url": "https://example.com",

+     "docs": "https://example.com/user-documentation",

+     "irc": "#some-channel",

+     "email": "someone@example.com",

+     "environment": "production"

+   },

+   "run": {

+     "url": "https://somewhere.com/job/ci-job/4794",

+     "log": "https://somewhere.com/job/ci-job/4794/console"

+   },

+   "artifact": {

+     "type": "container-image",

+     "repository": "someapp",

+     "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

+     "nvr": "someapp-2.8.71-7.el7_4",

+     "issuer": "jenkins",

+     "scratch": true,

+     "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

+   },

+   "type": "tier1",

+   "category": "functional",

+   "namespace": "factory2.c3i-ci",

+   "note": "Some notes.",

+   "generated_at": "2018-05-10 08:58:31.222602",

+   "version": "0.1.0"

+ }

@@ -0,0 +1,31 @@ 

+ {

+   "ci": {

+     "name": "C3I Jenkins",

+     "team": "DevOps",

+     "url": "https://example.com",

+     "docs": "https://example.com/user-documentation",

+     "irc": "#some-channel",

+     "email": "someone@example.com",

+     "environment": "production"

+   },

+   "run": {

+     "url": "https://somewhere.com/job/ci-job/4794",

+     "log": "https://somewhere.com/job/ci-job/4794/console"

+   },

+   "artifact": {

+     "type": "container-image",

+     "repository": "someapp",

+     "digest": "sha256:017eb7de7927da933a04a6c1ff59da0c41dcea194aaa6b5dd7148df286b92433",

+     "nvr": "someapp-2.8.71-7.el7_4",

+     "issuer": "jenkins",

+     "scratch": true,

+     "source": "git+https://src.fedoraproject.org/rpms/setup.git?#5e0ae23a"

+   },

+   "type": "tier1",

+   "category": "functional",

+   "namespace": "factory2.c3i-ci",

+   "lifetime": 15,

+   "progress": 10,

+   "generated_at": "2018-05-10 08:58:31.222602",

+   "version": "0.1.0"

+ }

@@ -0,0 +1,36 @@ 

+ $id: https://pagure.io/fedora-ci/messages/container-image.gate.complete

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Gating of the container image has been completed.

+     The decision has been made and applied.

+     This is a mandatory message.

+ 

+ properties:

+     artifact:

+         $ref: container-image.json

+     gate:

+         $ref: contact.json

+     summary:

+         $ref: gate.json#properties/summary

+     decision:

+         $ref: gate.json#properties/decision

+     decision_url:

+         $ref: gate.json#properties/decision_url

+     web_url:

+         $ref: common.json#properties/web_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - summary

+     - decision

+     - decision_url

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,32 @@ 

+ $id: https://pagure.io/fedora-ci/messages/container-image.gate.error

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Gating of the container image has failed.

+     The decision is unknown because of an infrastructure problem.

+     This is a mandatory message.

+ 

+ properties:

+     artifact:

+         $ref: container-image.json

+     gate:

+         $ref: contact.json

+     reason:

+         $ref: common.json#properties/reason

+     web_url:

+         $ref: common.json#properties/web_url

+     issue_url:

+         $ref: common.json#properties/issue_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - reason

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,25 @@ 

+ $id: https://pagure.io/fedora-ci/messages/container-image.gate.queued

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Gating of the container image has been queued.

+ 

+ properties:

+     artifact:

+         $ref: container-image.json

+     gate:

+         $ref: contact.json

+     web_url:

+         $ref: common.json#properties/web_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,25 @@ 

+ $id: https://pagure.io/fedora-ci/messages/container-image.gate.running

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Gating of the container image is in progres.

+ 

+ properties:

+     artifact:

+         $ref: container-image.json

+     gate:

+         $ref: contact.json

+     web_url:

+         $ref: common.json#properties/web_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,42 @@ 

+ $id: https://pagure.io/fedora-ci/messages/container-image.test.queued

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Testing has been queued, but not yet started.

+     This is an optional message.

+ 

+ properties:

+     ci:

+         $ref: contact.json

+     run:

+         $ref: run.json

+     artifact:

+         $ref: container-image.json

+     category:

+         $ref: common.json#properties/category

+     type:

+         $ref: common.json#properties/type

+     label:

+         $ref: common.json#properties/label

+     thread_id:

+         $ref: common.json#properties/thread_id

+     namespace:

+         $ref: common.json#properties/namespace

+     note:

+         $ref: common.json#properties/note

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - ci

+     - run

+     - artifact

+     - type

+     - category

+     - namespace

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,46 @@ 

+ $id: https://pagure.io/fedora-ci/messages/container-image.test.running

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Testing has been started and is in progress.

+     This is an optional message.

+ 

+ properties:

+     ci:

+         $ref: contact.json

+     run:

+         $ref: run.json

+     artifact:

+         $ref: container-image.json

+     category:

+         $ref: common.json#properties/category

+     type:

+         $ref: common.json#properties/type

+     label:

+         $ref: common.json#properties/label

+     lifetime:

+         $ref: common.json#properties/lifetime

+     thread_id:

+         $ref: common.json#properties/thread_id

+     namespace:

+         $ref: common.json#properties/namespace

+     note:

+         $ref: common.json#properties/note

+     progress:

+         $ref: common.json#properties/progress

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - ci

+     - run

+     - artifact

+     - type

+     - category

+     - namespace

+     - generated_at

+     - version

+ 

+ type: object

file modified
+1 -1
@@ -64,7 +64,7 @@ 

          description:

              Name-version-release of the artifact.

          examples:

-             - setup-2.8.71-7.el7_4

+             - someapp-2.8.71-7.el7_4

          type: string

      source:

          description:

Following up https://pagure.io/fedora-ci/messages/pull-request/18.

The following new message types for the container-image artifact type is
added:

  • container-image.test.queued
  • container-image.test.running
  • container-image.gate.queued
  • container-image.gate.running
  • container-image.gate.complete
  • container-image.gate.error

Examples are also provided.

rebased onto a0b62927abfdf1c16ca6b97ed66fb634291195f3

5 years ago

Thanks for the PR. I've reviewed it and I have two comments:

  • There are some extra fields included in the container-image.gate.queued example like system, status and xunit which do not make sense for the queued event as there is no result yet.
  • Also the nvr field in examples contains fedora:28. Would it make sense to rather use similar example someapp-2.8.71-7.el7_4 as you have in the schema?

Otherwise it looks fine.

Metadata Update from @psss:
- Request assigned

5 years ago

Metadata Update from @psss:
- Pull-request tagged with: container-image

5 years ago

rebased onto a12e33b0dcef9b2ad4ce099e00083222e8cb00ff

5 years ago

rebased onto 6ec8e64

5 years ago

@psss Does this look good to merge now?

Thanks for the update. Now it looks fine. Merging.

Pull-Request has been merged by psss

5 years ago