Use CMS workflow pattern with insecure registry config
This commit is contained in:
@@ -15,31 +15,38 @@ jobs:
|
||||
container:
|
||||
image: docker:latest
|
||||
options: --privileged
|
||||
env:
|
||||
HTTP_PROXY: http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
HTTPS_PROXY: http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
NO_PROXY: localhost,127.0.0.1,gitea-svc,194.5.195.53,10.0.0.0/8
|
||||
steps:
|
||||
- name: Set proxy for apk
|
||||
run: |
|
||||
export http_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
export https_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
|
||||
- name: Install git
|
||||
run: |
|
||||
export http_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
export https_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||
apk add --no-cache git
|
||||
run: apk add --no-cache git
|
||||
|
||||
- name: Checkout code
|
||||
- name: Clone repo
|
||||
run: |
|
||||
git clone --depth 1 --branch kub-stage http://194.5.195.53:30080/admin/FrontOffice.BFF.git .
|
||||
git log -1 --format="%H %s"
|
||||
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/FrontOffice.BFF.git .
|
||||
|
||||
- name: Start Docker daemon with insecure registry
|
||||
run: |
|
||||
mkdir -p /etc/docker
|
||||
cat > /etc/docker/daemon.json << 'DOCKER_EOF'
|
||||
cat > /etc/docker/daemon.json << 'DAEMON'
|
||||
{
|
||||
"insecure-registries": ["194.5.195.53:30080"]
|
||||
"insecure-registries": ["194.5.195.53:30080", "gitea-svc:3000"]
|
||||
}
|
||||
DOCKER_EOF
|
||||
DAEMON
|
||||
mkdir -p ~/.docker
|
||||
cat > ~/.docker/config.json << 'CONF'
|
||||
{
|
||||
"proxies": {
|
||||
"default": {
|
||||
"httpProxy": "http://proxyuser:87zH26nbqT2@46.249.98.211:3128",
|
||||
"httpsProxy": "http://proxyuser:87zH26nbqT2@46.249.98.211:3128",
|
||||
"noProxy": "localhost,127.0.0.1,gitea-svc,194.5.195.53,10.0.0.0/8"
|
||||
}
|
||||
}
|
||||
}
|
||||
CONF
|
||||
dockerd &
|
||||
for i in $(seq 1 30); do
|
||||
docker info >/dev/null 2>&1 && break || sleep 2
|
||||
|
||||
Reference in New Issue
Block a user