Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6da3c49222 | ||
|
|
c5a63a6730 | ||
|
|
488423694d | ||
|
|
d3c02afab5 | ||
|
|
8f3752c31f | ||
|
|
9d8c662a6c | ||
|
|
6b7527addb | ||
|
|
94323b7689 | ||
|
|
6315a4a1b3 | ||
|
|
4dbf12199b | ||
|
|
f31ea2e3b7 | ||
|
|
49f6380114 | ||
|
|
0124ee1201 | ||
|
|
436c70b19d | ||
|
|
f7e556aea6 | ||
|
|
f9a0b126b5 | ||
|
|
edd0729adc | ||
|
|
b76abecedb | ||
|
|
1864764d77 | ||
|
|
2fa9599095 |
@ -2,9 +2,16 @@ workflow:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH
|
- if: $CI_COMMIT_BRANCH
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
name: "$CI_COMMIT_TITLE: Squid auto rebuild docker from http://www.squid-cache.org/Versions images https://hub.docker.com/r/fredbcode"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||||
|
|
||||||
|
# Build on tmpfs
|
||||||
|
variables:
|
||||||
|
GIT_CLONE_PATH: $CI_BUILDS_DIR/tmpfs/$CI_PROJECT_NAME/$CI_COMMIT_BRANCH
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- quality
|
- quality
|
||||||
- Docker-hub-build
|
- Docker-hub-build
|
||||||
|
|||||||
@ -54,7 +54,7 @@ RUN echo "deb-src http://deb.debian.org/debian bookworm main contrib" >> /etc/ap
|
|||||||
--with-pidfile=/squid/squid.pid \
|
--with-pidfile=/squid/squid.pid \
|
||||||
--with-default-user=squid \
|
--with-default-user=squid \
|
||||||
--enable-removal-policies="lru,heap" \
|
--enable-removal-policies="lru,heap" \
|
||||||
&& make \
|
&& make -j4 \
|
||||||
&& find /tmp/ -type f -name "Makefil*" -delete \
|
&& find /tmp/ -type f -name "Makefil*" -delete \
|
||||||
&& find /tmp/ -type f -name "*.in" -delete
|
&& find /tmp/ -type f -name "*.in" -delete
|
||||||
# Install
|
# Install
|
||||||
|
|||||||
@ -19,14 +19,6 @@ docker-hub-build:
|
|||||||
- docker build --build-arg SQUID_VERSION=$SQUID_VERSION --pull -t $CONTAINER_BUILD_NOPROD_NAME_AMD64 .
|
- docker build --build-arg SQUID_VERSION=$SQUID_VERSION --pull -t $CONTAINER_BUILD_NOPROD_NAME_AMD64 .
|
||||||
- docker push $CONTAINER_BUILD_NOPROD_NAME_AMD64
|
- docker push $CONTAINER_BUILD_NOPROD_NAME_AMD64
|
||||||
|
|
||||||
.standalone:
|
|
||||||
image:
|
|
||||||
name: $CONTAINER_BUILD_NOPROD_NAME_AMD64
|
|
||||||
entrypoint: [""]
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
.services-amd64:
|
.services-amd64:
|
||||||
services:
|
services:
|
||||||
- name: $CONTAINER_BUILD_NOPROD_NAME_AMD64
|
- name: $CONTAINER_BUILD_NOPROD_NAME_AMD64
|
||||||
@ -45,11 +37,13 @@ docker-hub-test:
|
|||||||
|
|
||||||
SquidParseConfig:
|
SquidParseConfig:
|
||||||
stage: Docker-hub-test
|
stage: Docker-hub-test
|
||||||
extends: .standalone
|
image:
|
||||||
|
name: $CONTAINER_BUILD_NOPROD_NAME_AMD64
|
||||||
script:
|
script:
|
||||||
- /usr/sbin/squid -k parse /etc/squid/squid.conf
|
- /usr/sbin/squid -k parse /etc/squid/squid.conf
|
||||||
# Stop if error
|
# Stop if error
|
||||||
- "! /usr/sbin/squid -k parse /etc/squid/squid.conf 2>&1 | grep ERROR"
|
- "! /usr/sbin/squid -k parse /etc/squid/squid.conf 2>&1 | grep ERROR"
|
||||||
|
|
||||||
dive:
|
dive:
|
||||||
image:
|
image:
|
||||||
name: wagoodman/dive:latest
|
name: wagoodman/dive:latest
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -e "/squid/squid.pid" ];then
|
if [ -e "/run/squid.pid" ];then
|
||||||
echo "Squid pid: Already running ?"
|
echo "Squid pid: Already running ?"
|
||||||
rm /squid/squid.pid
|
rm /run/squid.pid
|
||||||
pkill squid
|
pkill squid
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -17,7 +17,7 @@ else
|
|||||||
touch "/var/spool/squid/$HOSTNAME"
|
touch "/var/spool/squid/$HOSTNAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while test -e /tmp/$HOSTNAME.pid
|
while test -e /run/squid.pid
|
||||||
do
|
do
|
||||||
echo "cache is generated/checked"
|
echo "cache is generated/checked"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user