Use CMS workflow pattern with insecure registry config
This commit is contained in:
@@ -15,31 +15,38 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
options: --privileged
|
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:
|
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
|
- name: Install git
|
||||||
run: |
|
run: apk add --no-cache git
|
||||||
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
|
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Clone repo
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 --branch kub-stage http://194.5.195.53:30080/admin/BackOffice.BFF.git .
|
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/BackOffice.BFF.git .
|
||||||
git log -1 --format="%H %s"
|
|
||||||
|
|
||||||
- name: Start Docker daemon with insecure registry
|
- name: Start Docker daemon with insecure registry
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /etc/docker
|
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 &
|
dockerd &
|
||||||
for i in $(seq 1 30); do
|
for i in $(seq 1 30); do
|
||||||
docker info >/dev/null 2>&1 && break || sleep 2
|
docker info >/dev/null 2>&1 && break || sleep 2
|
||||||
|
|||||||
Reference in New Issue
Block a user