Created
June 8, 2020 05:43
-
-
Save abdennour/663450d6104596e8d7d73b5aeeeaa251 to your computer and use it in GitHub Desktop.
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
pipeline { | |
agent any | |
stages { | |
stage('Build') { | |
parallel { | |
stage("build-ui") { | |
agent { | |
kubernetes { | |
defaultContainer 'jnlp' | |
yamlFile 'pod.yaml' | |
} | |
} | |
steps { | |
container('dind') { | |
sh "docker-build.sh -s=AAA -t=${env.BUILD_NUMBER}-${env.BRANCH_NAME}" | |
} | |
} | |
} | |
stage("build-form-render") { | |
agent { | |
kubernetes { | |
defaultContainer 'jnlp' | |
yamlFile 'pod.yaml' | |
} | |
} | |
steps { | |
container('dind') { | |
sh "docker-build.sh -s=BBB -t=${env.BUILD_NUMBER}-${env.BRANCH_NAME}" | |
} | |
} | |
} | |
} // end parallel DSL | |
} | |
} | |
} |
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
apiVersion: v1 | |
kind: Pod | |
spec: | |
# dnsConfig: | |
# options: | |
# - name: ndots | |
# value: "1" | |
# | |
# The below serviceAccount has been created by: | |
# eksctl create iamserviceaccount \ | |
# --name pipeline-builder \ | |
# --namespace cicd \ | |
# --cluster innovativeits-cluster \ | |
# --attach-policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess \ | |
# --approve | |
serviceAccountName: pipeline-builder | |
containers: | |
- name: dind | |
image: abdennour/docker:19.03-dind-compose1.25.1-aws1.17.0 | |
command: | |
- cat | |
tty: true | |
volumeMounts: | |
- name: dockersock | |
readOnly: true | |
mountPath: /var/run/docker.sock | |
resources: | |
requests: | |
cpu: 500m | |
memory: 768Mi | |
limits: | |
cpu: 2000m | |
memory: 2048Mi | |
# - name: busybox | |
# image: busybox | |
# command: | |
# - cat | |
# tty: true | |
volumes: | |
- name: dockersock | |
hostPath: | |
path: /var/run/docker.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment