Add Device42 build jobs

Change-Id: I6dfac7d1c2c15b668788918a9825d31824633612
This commit is contained in:
Mohammed Naser 2020-08-14 12:10:08 -04:00
parent ce239b2305
commit 3fa880a35a
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,12 @@
FROM debian:buster AS builder
RUN apt-get update && \
apt-get -y install curl unzip
RUN curl -o d42-agent-remote.zip \
$(curl -s https://www.device42.com/autodiscovery/ | grep d42-agent-remote | cut -d'"' -f4)
RUN unzip d42-agent-remote.zip
RUN chmod +x d42-agent-remote/d42_autodisc_linux_x64
FROM debian:buster
COPY --from=builder d42-agent-remote/d42_autodisc_linux_x64 /usr/local/bin/d42_autodisc_linux_x64
ENTRYPOINT ["/usr/local/bin/d42_autodisc_linux_x64", "-config", "/etc/device42/inventory.cfg"]

View File

@ -0,0 +1,31 @@
- job:
name: docker-images:build:d42-agent-remote
parent: vexxhost-build-docker-image
provides: docker-images:image:d42-agent-remote
vars: &id001
docker_images:
- context: d42-agent-remote/
repository: vexxhost/d42-agent-remote
files: &id002
- ^d42-agent-remote/.*
- job:
name: docker-images:upload:d42-agent-remote
parent: vexxhost-upload-docker-image
provides: docker-images:image:d42-agent-remote
vars: *id001
files: *id002
- job:
name: docker-images:promote:d42-agent-remote
parent: vexxhost-promote-docker-image
vars: *id001
files: *id002
- project:
check:
jobs:
- docker-images:build:d42-agent-remote
gate:
jobs:
- docker-images:upload:d42-agent-remote
promote:
jobs:
- docker-images:promote:d42-agent-remote