test: squid:4
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
3b24eabf9f
commit
12e3666db0
|
@ -49,7 +49,7 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
|
||||||
'/stack/squid'
|
'/stack/squid'
|
||||||
),
|
),
|
||||||
images.wait(15),
|
images.wait(15),
|
||||||
images.docker {
|
/*images.docker {
|
||||||
name +: 'build docker image:',
|
name +: 'build docker image:',
|
||||||
environment +: environment.environmentSecrets([
|
environment +: environment.environmentSecrets([
|
||||||
'LOCAL_DOCKER_REGISTRY',
|
'LOCAL_DOCKER_REGISTRY',
|
||||||
|
@ -68,10 +68,10 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
|
||||||
'cd squid-4',
|
'cd squid-4',
|
||||||
'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"',
|
'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"',
|
||||||
'docker build . -t $${LOCAL_DOCKER_REGISTRY}squid-4',
|
'docker build . -t $${LOCAL_DOCKER_REGISTRY}squid-4',
|
||||||
'docker push $${LOCAL_DOCKER_REGISTRY}squid',
|
'docker push $${LOCAL_DOCKER_REGISTRY}squid-4',
|
||||||
'docker logout $${LOCAL_DOCKER_REGISTRY}',
|
'docker logout $${LOCAL_DOCKER_REGISTRY}',
|
||||||
],
|
],
|
||||||
},/*
|
},
|
||||||
images.docker {
|
images.docker {
|
||||||
name +: 'build docker image:',
|
name +: 'build docker image:',
|
||||||
environment +: environment.environmentSecrets([
|
environment +: environment.environmentSecrets([
|
||||||
|
@ -94,7 +94,7 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
|
||||||
'docker push $${LOCAL_DOCKER_REGISTRY}squid',
|
'docker push $${LOCAL_DOCKER_REGISTRY}squid',
|
||||||
'docker logout $${LOCAL_DOCKER_REGISTRY}',
|
'docker logout $${LOCAL_DOCKER_REGISTRY}',
|
||||||
],
|
],
|
||||||
} */ /*
|
} */
|
||||||
compose([
|
compose([
|
||||||
environment.envSet('local-docker-registry'),
|
environment.envSet('local-docker-registry'),
|
||||||
environment.envSet('local-registry-password'),
|
environment.envSet('local-registry-password'),
|
||||||
|
@ -119,7 +119,7 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),*/
|
),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -29,25 +29,42 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- sleep 15
|
- sleep 15
|
||||||
|
|
||||||
- name: "dockerbuild docker image:"
|
- name: deploy squid
|
||||||
image: docker:dind
|
image: appleboy/drone-ssh
|
||||||
commands:
|
settings:
|
||||||
- set -e
|
envs:
|
||||||
- pwd
|
- drone_tag
|
||||||
- sleep 15
|
- drone_commit
|
||||||
- cd squid-4
|
- drone_build_number
|
||||||
- docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"
|
- drone_repo_name
|
||||||
- docker build . -t $${LOCAL_DOCKER_REGISTRY}squid-4
|
- drone_repo_namespace
|
||||||
- docker push $${LOCAL_DOCKER_REGISTRY}squid
|
- local_docker_registry
|
||||||
- docker logout $${LOCAL_DOCKER_REGISTRY}
|
- local_registry_password
|
||||||
|
host:
|
||||||
|
from_secret: ssh-host
|
||||||
|
key:
|
||||||
|
from_secret: ssh-key
|
||||||
|
port:
|
||||||
|
from_secret: ssh-port
|
||||||
|
script:
|
||||||
|
- set -e
|
||||||
|
- docker network prune -f
|
||||||
|
- cd /stack/squid/myCA
|
||||||
|
- cd ..
|
||||||
|
- docker stack rm squid
|
||||||
|
- sleep 60
|
||||||
|
- docker volume rm squid_squid-cache
|
||||||
|
- export SQUID_IMAGE=$${LOCAL_DOCKER_REGISTRY}squid
|
||||||
|
- docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"
|
||||||
|
- docker pull $${SQUID_IMAGE}
|
||||||
|
- docker stack deploy -c docker-compose.yml squid
|
||||||
|
username:
|
||||||
|
from_secret: ssh-user
|
||||||
environment:
|
environment:
|
||||||
LOCAL_DOCKER_REGISTRY:
|
LOCAL_DOCKER_REGISTRY:
|
||||||
from_secret: local-docker-registry
|
from_secret: local-docker-registry
|
||||||
LOCAL_REGISTRY_PASSWORD:
|
LOCAL_REGISTRY_PASSWORD:
|
||||||
from_secret: local-registry-password
|
from_secret: local-registry-password
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: docker
|
- name: docker
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
ARG DOCKER_PREFIX=
|
ARG DOCKER_PREFIX=
|
||||||
|
|
||||||
FROM ${DOCKER_PREFIX}ubuntu:artful
|
FROM ${DOCKER_PREFIX}ubuntu:xenial
|
||||||
|
|
||||||
ARG TRUST_CERT=
|
ARG TRUST_CERT=
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue