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
|
- name: Log in to registry
|
||||||
run: echo "${{ secrets.CI_TOKEN }}" | docker login gitea.gitea.svc.cluster.local:3000 -u chemavx --password-stdin
|
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
|
- name: Build and push bot image
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ steps.tag.outputs.TAG }}
|
TAG=${{ steps.tag.outputs.TAG }}
|
||||||
docker build \
|
docker buildx build \
|
||||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
--builder ci-builder \
|
||||||
--cache-from gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:buildcache \
|
--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:${TAG} \
|
||||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot:buildcache \
|
--push \
|
||||||
-f Dockerfile .
|
-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
|
- name: Build and push API image
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ steps.tag.outputs.TAG }}
|
TAG=${{ steps.tag.outputs.TAG }}
|
||||||
docker build \
|
docker buildx build \
|
||||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
--builder ci-builder \
|
||||||
--cache-from gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:buildcache \
|
--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:${TAG} \
|
||||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-api:buildcache \
|
--push \
|
||||||
-f Dockerfile.api .
|
-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
|
- name: Build and push dashboard image
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ steps.tag.outputs.TAG }}
|
TAG=${{ steps.tag.outputs.TAG }}
|
||||||
docker build \
|
docker buildx build \
|
||||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
--builder ci-builder \
|
||||||
--cache-from gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:buildcache \
|
--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:${TAG} \
|
||||||
-t gitea.gitea.svc.cluster.local:3000/chemavx/polymarket-bot-dashboard:buildcache \
|
--push \
|
||||||
-f dashboard/Dockerfile \
|
-f dashboard/Dockerfile \
|
||||||
dashboard
|
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
|
- name: Update k8s manifests
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user