Fix pre-commit hook

This commit is contained in:
jpic 2020-02-16 18:59:39 +01:00
parent a374ac58b3
commit 92b62799f4
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
- id: shlaxfile-gitlabci - id: shlaxfile-gitlabci
name: Regenerate .gitlab-ci.yml name: Regenerate .gitlab-ci.yml
description: Regenerate gitlabci description: Regenerate gitlabci
entry: pip install -e . && ./shlaxfile.py gitlabci entry: ./shlaxfile.py gitlabci
language: python language: python

View File

@ -159,8 +159,12 @@ class Buildah(Localhost):
async def push(self): async def push(self):
user = os.getenv('DOCKER_USER') user = os.getenv('DOCKER_USER')
passwd = os.getenv('DOCKER_PASS') passwd = os.getenv('DOCKER_PASS')
if user and passwd and os.getenv('CI') and self.image.registry: if user and passwd and os.getenv('CI'):
await self.exec('buildah', 'login', '-u', user, '-p', passwd, self.image.registry) self.output.cmd('buildah', 'login', '-u', '...', '-p', '...', self.image.registry)
old = self.output.debug
self.output.debug = False
await self.exec('buildah', 'login', '-u', user, '-p', passwd, self.image.registry or 'docker.io', )
self.output.debug = old
for tag in self.image.tags: for tag in self.image.tags:
await self.exec('buildah', 'push', f'{self.image.repository}:{tag}') await self.exec('buildah', 'push', f'{self.image.repository}:{tag}')