Fix Gitea Docker build and Rancher deployment
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 1m1s
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 1m1s
This commit is contained in:
@@ -99,8 +99,39 @@ jobs:
|
||||
# ============================================================
|
||||
# Build & Push
|
||||
# ============================================================
|
||||
- name: Build and Push Docker Image
|
||||
uses: docker/build-push-action@v4
|
||||
- name: Prepare Base Image
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
|
||||
BASE_IMAGE="registry-nexus-bpkd.drc-bpkd.data-center.id/php74-fpm-oci8-lengkap:1.0"
|
||||
|
||||
echo "Checking local base image..."
|
||||
|
||||
if podman image exists "$BASE_IMAGE"; then
|
||||
echo "Base image already exists locally."
|
||||
else
|
||||
echo "Base image not found. Pulling from Nexus..."
|
||||
|
||||
HTTPS_PROXY= \
|
||||
HTTP_PROXY= \
|
||||
https_proxy= \
|
||||
http_proxy= \
|
||||
NO_PROXY="registry-nexus-bpkd.drc-bpkd.data-center.id,10.81.2.10" \
|
||||
no_proxy="registry-nexus-bpkd.drc-bpkd.data-center.id,10.81.2.10" \
|
||||
podman pull "$BASE_IMAGE"
|
||||
fi
|
||||
|
||||
echo "Creating local build tag..."
|
||||
|
||||
podman tag \
|
||||
"$BASE_IMAGE" \
|
||||
php74-fpm-oci8-lengkap:1.0
|
||||
|
||||
echo "Base image ready:"
|
||||
podman image inspect php74-fpm-oci8-lengkap:1.0 \
|
||||
--format '{{.Id}}'
|
||||
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM registry-nexus-bpkd.drc-bpkd.data-center.id/php74-fpm-oci8-lengkap:1.0
|
||||
FROM php74-fpm-oci8-lengkap:1.0
|
||||
|
||||
# =========================================================
|
||||
# Build arguments
|
||||
|
||||
Reference in New Issue
Block a user