Add proxy for apk add
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Build and Deploy to Kubernetes
|
name: Build and Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -6,7 +6,7 @@ on:
|
|||||||
- kub-stage
|
- kub-stage
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: 194.5.195.53:30080
|
REGISTRY: gitea-svc:3000
|
||||||
IMAGE_NAME: admin/backoffice
|
IMAGE_NAME: admin/backoffice
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -17,17 +17,25 @@ jobs:
|
|||||||
options: --privileged
|
options: --privileged
|
||||||
steps:
|
steps:
|
||||||
- name: Install git
|
- name: Install git
|
||||||
run: apk add --no-cache 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
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/BackOffice.git .
|
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/BackOffice.git .
|
||||||
git log -1 --format="%H %s"
|
git log -1 --format="%H %s"
|
||||||
|
|
||||||
- name: Start Docker daemon
|
- name: Start Docker daemon with insecure registry
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /etc/docker
|
mkdir -p /etc/docker
|
||||||
echo '{"insecure-registries":["194.5.195.53:30080","gitea-svc:3000"]}' > /etc/docker/daemon.json
|
cat > /etc/docker/daemon.json << 'DOCKER_EOF'
|
||||||
|
{
|
||||||
|
"insecure-registries": ["gitea-svc:3000"]
|
||||||
|
}
|
||||||
|
DOCKER_EOF
|
||||||
|
|
||||||
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
|
||||||
@@ -36,6 +44,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Docker Image
|
- name: Build Docker Image
|
||||||
run: |
|
run: |
|
||||||
|
cd src/BackOffice
|
||||||
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
||||||
--build-arg HTTP_PROXY=http://proxyuser:87zH26nbqT2@46.249.98.211:3128 \
|
--build-arg HTTP_PROXY=http://proxyuser:87zH26nbqT2@46.249.98.211:3128 \
|
||||||
|
|||||||
Reference in New Issue
Block a user