test: squid:4
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Giles Bradshaw 2020-08-06 10:28:48 +01:00
parent b1ffbd6c64
commit 63a782b391
4 changed files with 22 additions and 39 deletions

View File

@ -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',
@ -71,7 +71,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'),
@ -96,7 +96,7 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
] ]
} }
}, },
), ),*/
], ],
} }
] ]

View File

@ -29,42 +29,25 @@ steps:
commands: commands:
- sleep 15 - sleep 15
- name: deploy squid - name: "dockerbuild docker image:"
image: appleboy/drone-ssh image: docker:dind
settings: commands:
envs:
- drone_tag
- drone_commit
- drone_build_number
- drone_repo_name
- drone_repo_namespace
- local_docker_registry
- local_registry_password
host:
from_secret: ssh-host
key:
from_secret: ssh-key
port:
from_secret: ssh-port
script:
- set -e - set -e
- docker network prune -f - pwd
- cd /stack/squid/myCA - sleep 15
- cd .. - cd docker
- 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 login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"
- docker pull $${SQUID_IMAGE} - docker build . -t $${LOCAL_DOCKER_REGISTRY}squid
- docker stack deploy -c docker-compose.yml squid - docker push $${LOCAL_DOCKER_REGISTRY}squid
username: - docker logout $${LOCAL_DOCKER_REGISTRY}
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

View File

@ -3,14 +3,14 @@ RUN apt-get -y update
RUN apt-get install -y curl supervisor git openssl build-essential libssl-dev wget vim curl RUN apt-get install -y curl supervisor git openssl build-essential libssl-dev wget vim curl
RUN mkdir -p /var/log/supervisor RUN mkdir -p /var/log/supervisor
WORKDIR /apps/ WORKDIR /apps/
RUN wget -O - http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.27.tar.gz | tar zxfv - \ RUN wget -O - http://www.squid-cache.org/Versions/v4/squid-4.12.tar.gz.asc | tar zxfv - \
&& CPU=$(( `nproc --all`-1 )) \ && CPU=$(( `nproc --all`-1 )) \
&& cd /apps/squid-3.5.27/ \ && cd /apps/squid-4.12/ \
&& ./configure --prefix=/apps/squid --enable-icap-client --enable-ssl --with-openssl --enable-ssl-crtd --enable-auth --enable-basic-auth-helpers="NCSA" \ && ./configure --prefix=/apps/squid --enable-icap-client --enable-ssl --with-openssl --enable-ssl-crtd --enable-auth --enable-basic-auth-helpers="NCSA" \
&& make -j$CPU \ && make -j$CPU \
&& make install \ && make install \
&& cd /apps \ && cd /apps \
&& rm -rf /apps/squid-3.5.27 && rm -rf /apps/squid-4.12
ADD . /apps/ ADD . /apps/
RUN chown -R nobody:nogroup /apps/ RUN chown -R nobody:nogroup /apps/

View File

@ -28,8 +28,8 @@ htcp_access deny all
visible_hostname git.local-domain visible_hostname git.local-domain
http_port 3128 ssl-bump generate-host-certificates=on cert=/apps/CA_crt.pem key=/apps/CA_key.pem version=4 #http_port 3128 ssl-bump generate-host-certificates=on cert=/apps/CA_crt.pem key=/apps/CA_key.pem version=4
#http_port 3128 ssl-bump generate-host-certificates=on cert=/apps/CA_crt.pem key=/apps/CA_key.pem options=NO_SSLv3 dhparams=/apps/dhparam.pem http_port 3128 ssl-bump generate-host-certificates=on cert=/apps/CA_crt.pem key=/apps/CA_key.pem options=NO_SSLv3 dhparams=/apps/dhparam.pem
#https_port 3129 ssl-bump generate-host-certificates=on cert=/apps/CA_crt.pem key=/apps/CA_key.pem options=NO_SSLv3 dhparams=/apps/dhparam.pem #https_port 3129 ssl-bump generate-host-certificates=on cert=/apps/CA_crt.pem key=/apps/CA_key.pem options=NO_SSLv3 dhparams=/apps/dhparam.pem
always_direct allow all always_direct allow all