Skip to content

Commit

Permalink
Revert "CLOUD-483: Use google container builder to build docker image (
Browse files Browse the repository at this point in the history
…#117)"

This reverts commit f121a83.
  • Loading branch information
ClementGautier authored Feb 16, 2018
1 parent f121a83 commit e46200e
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,10 @@ def withBuildNode(String phpVersion, body) {
podTemplate(name: "php-api-client-node", label: "build-" + uuid, containers: [
containerTemplate(
name: "docker",
image: "paulwoelfel/docker-gcloud:v1.13",
image: "paulwoelfel/docker-gcloud",
ttyEnabled: true,
command: 'cat',
envVars: [envVar(key: "DOCKER_API_VERSION", value: "1.23")],
resourceRequestCpu: '100m', resourceRequestMemory: '200Mi'),
containerTemplate(
name: "php",
Expand All @@ -455,6 +456,8 @@ def withBuildNode(String phpVersion, body) {
envVar(key: "COMPOSER_AUTH", value: "{\"github-oauth\":{\"github.com\": \"$token\"}}")],
resourceRequestCpu: '500m',
resourceRequestMemory: '1000Mi')
], volumes: [
hostPathVolume(hostPath: "/var/run/docker.sock", mountPath: "/var/run/docker.sock")
]) {
node("build-" + uuid) {
dir('/home/jenkins') {
Expand All @@ -480,12 +483,14 @@ def withDockerGcloud(body) {
podTemplate(name: "php-api-client-gcloud", label: "dockergcloud-" + uuid, containers: [
containerTemplate(
name: "docker",
image: "paulwoelfel/docker-gcloud:v1.13",
image: "paulwoelfel/docker-gcloud",
ttyEnabled: true,
command: 'cat',
resourceRequestCpu: '100m',
resourceRequestMemory: '200Mi'
)
resourceRequestMemory: '200Mi',
envVars: [envVar(key: "DOCKER_API_VERSION", value: "1.23")])
], volumes: [
hostPathVolume(hostPath: "/var/run/docker.sock", mountPath: "/var/run/docker.sock")
]) {
node("dockergcloud-" + uuid) {
container("docker") {
Expand Down Expand Up @@ -596,6 +601,10 @@ def queue(String phpApiImageName, String pimImageName, String pimVersion, String
}]
}]
""")
], volumes: [
hostPathVolume(hostPath: "/var/run/docker.sock", mountPath: "/var/run/docker.sock"),
hostPathVolume(hostPath: "/usr/bin/docker", mountPath: "/usr/bin/docker")

]) {
node("pubsub-" + uuid) {
def messages = body()
Expand Down Expand Up @@ -657,7 +666,8 @@ def clearTemplateNames() {
def saveDockerData(String gcrName, String gCloudcontainerName = "docker") {
container(gCloudcontainerName) {
sh "echo 'FROM alpine:3.6\nADD . /data\n' > Dockerfile"
sh "gcloud container builds submit --tag ${gcrName} ."
sh "docker build -t ${gcrName} ."
sh "gcloud docker -- push ${gcrName}"
}
}

Expand Down

0 comments on commit e46200e

Please sign in to comment.