ci: migrate to buildx docker-container driver with standalone buildkitd
CI/CD / build-and-push (push) Failing after 4m15s
CI/CD / build-and-push (push) Failing after 4m15s
This commit is contained in:
+37
-18
@@ -26,42 +26,61 @@ jobs:
|
||||
- name: Log in to registry
|
||||
run: echo "${{ secrets.CI_TOKEN }}" | docker login gitea.gitea.svc.cluster.local:3000 -u chemavx --password-stdin
|
||||
|
||||
- name: Create buildx builder
|
||||
run: |
|
||||
cat > /tmp/buildkitd.toml << 'EOF'
|
||||
[registry."registry-cache.registry-cache.svc.cluster.local:5000"]
|
||||
http = true
|
||||
insecure = true
|
||||
|
||||
[registry."gitea.gitea.svc.cluster.local:3000"]
|
||||
http = true
|
||||
insecure = true
|
||||
|
||||
[registry."docker.io"]
|
||||
mirrors = ["registry-cache.registry-cache.svc.cluster.local:5000"]
|
||||
EOF
|
||||
docker buildx create \
|
||||
--name ci-builder \
|
||||
--driver docker-container \
|
||||
--driver-opt network=host \
|
||||
--config /tmp/buildkitd.toml \
|
||||
--use
|
||||
docker buildx inspect --bootstrap
|
||||
|
||||
- name: Build and push bot image
|
||||
run: |
|
||||
TAG=${{ steps.tag.outputs.TAG }}
|
||||
docker build \
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||
--cache-from gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:buildcache \
|
||||
docker buildx build \
|
||||
--builder ci-builder \
|
||||
--cache-from type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:buildcache \
|
||||
--cache-to type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:buildcache,mode=max \
|
||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:${TAG} \
|
||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:buildcache \
|
||||
--push \
|
||||
-f Dockerfile .
|
||||
docker push gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:${TAG}
|
||||
docker push gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:buildcache
|
||||
|
||||
- name: Build and push API image
|
||||
run: |
|
||||
TAG=${{ steps.tag.outputs.TAG }}
|
||||
docker build \
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||
--cache-from gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:buildcache \
|
||||
docker buildx build \
|
||||
--builder ci-builder \
|
||||
--cache-from type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:buildcache \
|
||||
--cache-to type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:buildcache,mode=max \
|
||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:${TAG} \
|
||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:buildcache \
|
||||
--push \
|
||||
-f Dockerfile.api .
|
||||
docker push gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:${TAG}
|
||||
docker push gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:buildcache
|
||||
|
||||
- name: Build and push dashboard image
|
||||
run: |
|
||||
TAG=${{ steps.tag.outputs.TAG }}
|
||||
docker build \
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||
--cache-from gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:buildcache \
|
||||
docker buildx build \
|
||||
--builder ci-builder \
|
||||
--cache-from type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:buildcache \
|
||||
--cache-to type=registry,ref=gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:buildcache,mode=max \
|
||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:${TAG} \
|
||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:buildcache \
|
||||
--push \
|
||||
-f dashboard/Dockerfile \
|
||||
dashboard
|
||||
docker push gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:${TAG}
|
||||
docker push gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:buildcache
|
||||
|
||||
- name: Update k8s manifests
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user