1 Star 0 Fork 0

AliyunContainerService/java-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.gitlab-ci-dind.yml 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
筱年 提交于 2024-11-10 22:51 +08:00 . ::
image: registry.cn-hangzhou.aliyuncs.com/acs-demo-ns/docker:27-dind
cache:
paths:
- .m2/repository
stages:
- build
- deploy
variables:
# When using dind service, you must instruct Docker to talk with
# the daemon started inside of the service. The daemon is available
# with a network connection instead of the default
# /var/run/docker.sock socket.
DOCKER_HOST: tcp://localhost:2376
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/services/#accessing-the-services.
# If you're using GitLab Runner 12.7 or earlier with the Kubernetes executor and Kubernetes 1.6 or earlier,
# the variable must be set to tcp://localhost:2376 because of how the
# Kubernetes executor connects services to the job container
# DOCKER_HOST: tcp://localhost:2376
#
# Specify to Docker where to create the certificates. Docker
# creates them automatically on boot, and creates
# `/certs/client` to share between the service and job
# container, thanks to volume mount from config.toml
DOCKER_TLS_CERTDIR: "/certs"
# These are usually specified by the entrypoint, however the
# Kubernetes executor doesn't run entrypoints
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4125
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
KUBECONFIG: /var/run/secrets/kubernetes.io/serviceaccount/
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
before_script:
- echo "before task"
- ls -al ./
- pwd
- sh /usr/local/bin/dockerd-entrypoint.sh &
- sleep 10s
build_image:
stage: build
tags:
- demo
script:
- docker info
- sleep 1d
- docker build --network host -t demo:v1.0.0 -f Dockerfile .
deploy_to_kubernetes:
stage: deploy
tags:
- demo
script:
- kubectl get pod -n default
only:
- main
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/AliyunContainerService/java-demo.git
git@gitee.com:AliyunContainerService/java-demo.git
AliyunContainerService
java-demo
java-demo
main

搜索帮助