gitlab

Gitlab CI/CD runner : mvn command not found

橙三吉。 提交于 2019-12-11 09:13:33
问题 Maven is well installed on my gitlab-runner server. When executing mvn clean directly on my repo it works, when running my pipeline using Gitlab UI got this error : bash: line 60: mvn: command not found ERROR: Job failed: exit status 1 I notice that I tried to fix the problem by adding the before_script section in the .gitlab-ci.yml file : before_script: - export MAVEN_HOME=/usr/local/apache-maven I add also the line : environment = ["MAVEN_HOME=/usr/local/apache-maven"] on the config.toml

Git、GitHub、GitLab三者之间的联系以及区别

折月煮酒 提交于 2019-12-11 08:46:58
Git、GitHub、GitLab三者之间的联系以及区别 在讲区别以及联系之前先简要的介绍一下,这三者都是什么(本篇文章适合刚入门的新手,大佬请出门左转) 1.什么是 Git? Git 是一个版本控制系统。 版本控制是一种用于记录一个或多个文件内容变化,方便我们查阅特定版本修订情况的系统。 以前在没有使用版本控制的时候,我们通常在我们的项目根目录下这样命名项目: project_v1、project_v1.1、project_v2等等,通过这种方式记录我们项目的不同版本的修改, 有的时候我们还会在不同版本的文件中写一个说明,记录此版本项目新增、修改,删除等操作。 这样的操作是很繁杂的,有的时候还可能因为一些非人为因素导致文件丢失这样的事故。 有了版本控制系统,我们就不用再手动进行一些繁杂的操作,并且对于文件丢失这种事故我们也不 用再担心,你可以随便回到历史记录的某个时刻。 早期出现的版本控制系统有:SVN、CVS等,它们是集中式版本控制系统,都有一个单一的集中管理 的服务器,保存所有文件的修订版本,而协同合作的开发人员都通过客户端连接到这台服务器,取出 最新的文件或者提交更新。 从网上找了一张图,展示一下它们的原理: 而我们的主角 Git 是分布式版本控制系统。Git 已经成为越来越多开发者的青睐,因为分布式的优势是很显著的。 2.说一下集中式和分布式版本控制系统的区别:

how to add persistent volume for Maven in Gitlab with Kubernetes runner

感情迁移 提交于 2019-12-11 08:35:45
问题 Situation: server A: we run Gitlab in a container. server B: we have Kubernetes. Gitlab uses Kubernetes runner. Some of our projects then build applications using docker container with Git and Maven. Maven always has to download all kinds of things into it's /root/.m2 cache. What I need to do is create a persistent volume that these jobs can use, so once it's downloaded, it doesn't have to do it again each time someone wants to build or test something. These containers are always built anew

How can I make docker to not eat up disk space if used in Continuous integration

让人想犯罪 __ 提交于 2019-12-11 07:37:46
问题 I am playing with docker and plan to use it in a GitLab CI environment to package the current project state to containers and provide running instances to do reviews. I use a very simple Dockerfile as follows: FROM php:7.0-apache RUN sed -i 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf COPY . /var/www/html/ Now, as soon as a I a new (empty) file ( touch foobar ) to the current directory and call docker build -t test2 --rm . again, a full new layer is

Jenkins and Gitlab don't fetch code

五迷三道 提交于 2019-12-11 07:14:41
问题 I have a problem when i set my own project. I start to configure my Jenkins Job, and I done this: create credential on Jenkins for gitlab user account create access token on gitlab and use this token in Jenkins to enable it and this is the job configuration but when i start a build, after10 minutes i get this error Started by user admin Building in workspace /Users/Shared/Jenkins/Home/workspace/xxxxxxxxx > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the

What does Gitlab Host URL means in configuring gitlab in jenkins?

孤街浪徒 提交于 2019-12-11 07:04:15
问题 The one specified in here in the Configuring the Jenkins server section. 回答1: In brief: it's Yours GitLab API Endpoint without api/v4 . If you want to use Webhooks, or GitLab OAuth Plugin it very important field. 回答2: if you use gitlab as global type https://gitlab.com/. but if you have other domain that use with gitlab, should use https://gitlab.your-domain-name.com. it work fine for me, just add https://gitlab.com because my project store on gitlab.com as simple. :D 来源: https:/

Updating and committing file by using gitlab api

空扰寡人 提交于 2019-12-11 07:00:01
问题 I want to update file content and commit it. To be able to achieve it, I looked the api of gitlab from the url; http://mygitlabadress/help/api/README.md It says Updating existing file is done as; http://mygitlabadress/help/api/repository_files.md#update-existing-file-in-repository I follow the instructions and write; http://mygitlabadress/api/v4/projects/:id/repository/files/file1%2Ffile2%2Ftest?ref=master&author_name=name%20surname&content=some%20other%20content&commit_message=update%20file

How to Make Kubectl run a container after pod is created

痞子三分冷 提交于 2019-12-11 06:32:28
问题 Intention is to execute gatling perf tests from command line .Equivalent docker command is docker run --rm -w /opt/gatling-fundamentals/ tarunkumard/tarungatlingscript:v1.0 ./gradlew gatlingRun-simulations.RuntimeParameters -DUSERS=500 -DRAMP_DURATION=5 -DDURATION=30 Now to map above docker run in Kubernetes using kubectl, I have created a pod for which gradlewcommand.yaml file is below apiVersion: v1 kind: Pod metadata: name: gradlecommandfromcommandline labels: purpose:

Govendor and dep trying to fetch group, when it should fetch projects

情到浓时终转凉″ 提交于 2019-12-11 06:14:23
问题 I have Go project in gitlab inside a group, so it is like: https://gitlab.com/company/group/project1.git https://gitlab.com/company/group/project2.git etc. I have a vendor folder with vendor.json generated When I call govendor fetch +a # cd .; git clone https://gitlab.com/company/group.git /home/user/go/.cache/govendor/gitlab.com/company/group Cloning into '/home/user/go/.cache/govendor/gitlab.com/company/group'... remote: The project you were looking for could not be found. fatal: repository

gitlab-ci: setup every day builds

送分小仙女□ 提交于 2019-12-11 06:08:27
问题 Really do not understand how I can setup daily scheduler in gitlab . I have simple application and I need automatically build it every day at 8.00 morning. I tried with Following https://gitlab.com/help/ci/triggers/README.md , but i do not understand how can I run this crone job? 30 0 * * * curl --request POST --form token=TOKEN --form ref=master https://gitlab.example.com/api/v3/projects/9/trigger/builds This is also unacceptable http://cloudlady911.com/index.php/2016/11/02/how-to-schedule-a