Add up command, allow fine grain debug output

This commit is contained in:
jpic
2020-02-12 13:19:44 +01:00
parent 409b625309
commit 2e9a23eb5a
6 changed files with 118 additions and 46 deletions
+12
View File
@@ -1,6 +1,8 @@
import os
import subprocess
from ..exceptions import WrongResult
CI_VARS = (
# gitlab
'CI_COMMIT_SHORT_SHA',
@@ -85,3 +87,13 @@ class Commit:
'--name', script.container.name,
':'.join((self.repo, self.tags[0])),
)
async def up(self, script):
name = '-'.join([script.pod.name, script.container.name])
try:
await script.exec('podman', 'inspect', name)
except WrongResult:
await script.exec(
'podman', 'run', '-d', '--name', name,
':'.join((self.repo, self.tags[0])),
)