From 4ad86a33a8ed752674a509fbb096fa48c6326b22 Mon Sep 17 00:00:00 2001 From: Junv Zhao Date: Mon, 27 Jan 2020 23:24:43 +1100 Subject: [PATCH] Add anohter simple pipeline --- categories/devops.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/categories/devops.md b/categories/devops.md index 3fb7ee6..cf3ea26 100644 --- a/categories/devops.md +++ b/categories/devops.md @@ -17,7 +17,34 @@ - Use Docker container for each stage, which means to need to install various dependencies on agents - Scale up/down(On-demand) agents when needed to save costs. -### A sample jenkins job configuration file +### A simple jenkins job configuration file + +``` +pipeline { + agent none + stages { + stage('Back-end') { + agent { + docker { image 'maven:3-alpine' } + } + steps { + sh 'mvn --version' + } + } + stage('Front-end') { + agent { + docker { image 'node:7-alpine' } + } + steps { + sh 'node --version' + } + } + } +} +``` + + +### A more comprehensive jenkins pipeline From