李明
|
copy到gitlab上
runner管理新的gitlabci-maven
sudo gitlab-ci-multi-runner register
新建github-ci 文件
# These are the default stages. You don't need to explicitly define them. But you could define any stages you need. stages: - build - test - deploy # This is the name of the job. You can choose it freely. maven_build: # A job is always executed within a stage. If no stage is set, it defaults to 'test' stage: test # Since we require Maven for this job, we can restrict the job to runners with a certain tag. Of course, we need to configure a runner with the tag maven with a maven installation tags: - maven # Here you can execute arbitrate terminal commands. # If any of the commands returns a non zero exit code the job fails script: - echo "Building project with maven" - mvn verify 开始CI操作
Running with gitlab-ci-multi-runner 9.5.1 (96b34cc) on maven (e6c8a28d) Using Docker executor with image maven:latest ... Using docker image sha256:c4ef2f017e30bbabddf847a3f458985e55ccc24a2be7dbdf72dc032e7bece3e5 for predefined container... Pulling docker image maven:latest ... Using docker image maven:latest ID=sha256:1361ae58b0a463172267a0622430ad5f4f8108c4d4b7b1ae7d552e367cf92413 for build container... Running on runner-e6c8a28d-project-3-concurrent-0 via gitlab-ci... Cloning repository... Cloning into '/builds/root/gitlabci-maven'... fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.example.com/root/gitlabci-maven.git/': Couldn't resolve host 'gitlab.example.com' ERROR: Job failed: exit code 1
修改Runner的 sudo vi /etc/gitlab-runner/config.toml
PS:这次主要给大家简单的介绍下CI,还没设计到CD。下次吧!
|
2018-10-29 11:08:16