Skip to content

Commit

Permalink
Merge pull request #472 from whole-tale/imageId_in_imageInfo
Browse files Browse the repository at this point in the history
Include imageId in tale's imageInfo
  • Loading branch information
Xarthisius authored May 3, 2021
2 parents bb2d57b + 95cafe2 commit 493aafe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions server/rest/tale.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ def updateBuildStatus(self, event):
if status == JobStatus.SUCCESS:
result = getCeleryApp().AsyncResult(job['celeryTaskId']).get()
tale['imageInfo']['digest'] = result['image_digest']
tale["imageInfo"]["imageId"] = tale["imageId"]
tale['imageInfo']['repo2docker_version'] = result['repo2docker_version']
tale['imageInfo']['last_build'] = result['last_build']
tale['imageInfo']['status'] = ImageStatus.AVAILABLE
Expand Down
8 changes: 5 additions & 3 deletions server/schema/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,12 @@
"description": "Attributes describing a Tale image",
"type": "object",
"properties": {
"created": {"type": "string", "format": "date-time"},
"jobId": {"type": "string"},
"digest": {"type": "string"},
"fullName": {"type": "string"},
"imageId": {"type": "string"},
"jobId": {"type": "string"},
"last_build": {"type": "integer"},
"repo2docker_version": {"type": "string"},
"status": {"type": "integer", "enum": [0, 1, 2, 3]},
},
}

Expand Down
11 changes: 7 additions & 4 deletions server/schema/tale.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,13 @@
"illustration": ("https://raw.githubusercontent.com/whole-tale/dashboard/"
"master/public/images/demo-graph2.jpg"),
"imageId": "5c4886279759c200017b22a3",
'imageInfo': {
'jobId': '5873dcdbaec03000014x123',
'digest': 'sha256:9aaece098841b13cdc64ea6756767357f5c9eb1ab10f67b9e67a90960b894053',
'fullName': 'registry.local.wholetale.org/5c3cd7faa697bf0001ce6cc0-1547494547'
"imageInfo": {
"digest": "registry.local.wholetale.org/608/1619806964@sha256:a",
"imageId": "5c4886279759c200017b22a3",
"jobId": "608c4d99e909e4f4e2c6973a",
"last_build": 1619806964,
"repo2docker_version": "wholetale/repo2docker_wholetale:v1.0rc1",
"status": 3
},
"public": False,
"publishInfo": [
Expand Down

0 comments on commit 493aafe

Please sign in to comment.