Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCKER] Add Jenkins pipeline with integrity checker (DEVSYS-729)
- Loading branch information
Thomas Ferreira
committed
Dec 12, 2017
1 parent
69e83db
commit bc2ee9e
Showing
5 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ubuntu:14.04 | ||
|
||
LABEL maintainer="Thomas Ferreira <thomas.ferreira@dailymotion.com>" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends build-essential yui-compressor \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /usr/src/ | ||
|
||
WORKDIR /usr/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
pipeline { | ||
environment { | ||
DOCKER_HOST = "tcp://inspect-02.adm.dc3.dailymotion.com:4243" | ||
serviceName = "dailymotion-sdk-js" | ||
|
||
} | ||
|
||
agent { | ||
label 'ci-ubuntu-slave' | ||
} | ||
|
||
stages{ | ||
stage ("Quality") { | ||
steps { | ||
parallel( | ||
"Integrity" : { | ||
sh 'make integrity' | ||
} | ||
) | ||
} | ||
|
||
post { | ||
always { | ||
sh "docker-compose down" | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
failure { | ||
slackSend "${serviceName}: Error on *${env.JOB_NAME}* for branch *${env.BRANCH_NAME}* (${env.BUILD_ID})" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- mode: makefile -*- | ||
SHELL = /bin/sh | ||
|
||
CP = cp | ||
|
||
DOCKER = docker | ||
COMPOSE = docker-compose | ||
VERSION = `git rev-parse --short HEAD` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "2" | ||
services: | ||
app: | ||
build: | ||
context: . | ||
network_mode: bridge | ||
|
||
integrity: | ||
build: | ||
context: . | ||
command: bash -c "make && test -s all.js" | ||
volumes: | ||
- .:/usr/src/ | ||
network_mode: bridge | ||
|