Merge branch 'security-scanner' into 'master'

Security scanner

See merge request fablab/labsync!33
This commit is contained in:
jalr 2018-06-13 09:26:56 +00:00
commit bfff5648df
3 changed files with 8 additions and 3 deletions

View file

@ -60,7 +60,7 @@ security_scanner:
- apk add --no-cache make
script:
- make images/debian-stretch.squashfs
artifacts:
artifacts: &squashfs_artifacts
paths:
- images
tags:
@ -83,4 +83,5 @@ squashfs_master:
except:
- schedules
artifacts:
<<: *squashfs_artifacts
expire_in: 12 weeks

View file

@ -34,3 +34,6 @@ class GitLab:
target = FileWriter(destPath)
artifact = self._project.jobs.get(job_id).artifact(sourcePath, streamed=True, action=target)
del(target)
def createPipeline(self, ref):
pipeline = self._project.pipelines.create({'ref': ref})

View file

@ -35,6 +35,7 @@ def main(argv):
job = gitlab.getLastSuccessfulJob('master', 'squashfs_master')
gitlab.downloadArtifact(job, 'images/debian-' + distro + '.dpkg-list', 'debian-' + distro + '.dpkg-list')
if checkDebianDistro(distro) > 0:
print("triggering build")
ref = job.attributes['ref']
print("creating pipeline for reference {}".format(ref))
pprint(job.attributes)
job.play()
gitlab.createPipeline(ref)