gitlab

Can I combine two branches into a GitLab CI build?

…衆ロ難τιáo~ 提交于 2019-12-11 16:05:20
问题 I know that GitLab CI will build each branch separately, but when I build the feature branch I want to compare some test results against the same tests on the master branch. I could do that against the most recent build of master, or I'm happy to rebuild master on every feature branch commit if required. Is that possible in GitLab CI? 回答1: You can use pipeline triggers to build your master branch during a feature branch pipeline. In your case I guess you want to wait for the master pipeline

How to deploy maven project on aws with Gitlab CI/CD

試著忘記壹切 提交于 2019-12-11 15:54:39
问题 I'm trying to deploy a java maven project on aws with Gitlab CI/CD. This is my .gitlab-ci.yml image: maven:3-jdk-8 services: - docker:dind stages: - test - build - deploy maven-test: stage: test script: - echo "Test stage" - mvn clean validate compile test -B maven-build: stage: build script: - echo "Build stage" - mvn install -B -DskipTests artifacts: paths: - ./target/*.jar maven-deploy: stage: deploy script: - echo "Deploy stage" - scp -v -o StrictHostKeyChecking=no -I "mykey.pem" ./target

On Gitlab, how to view a file as of commit ref

有些话、适合烂在心里 提交于 2019-12-11 14:54:41
问题 On Gitlab, how to view a file as of commit ref? I know that that on command line git, the command is: git show <commit ref>:<file_name> how to I do the same on gitlab? 回答1: Go to URL https://gitlab.com/$USER/$REPO/blob/$SHA1/path/to/file For example, https://gitlab.com/sqlobject/sqlobject/blob/2ce592300bdd0cfcb444b24cdfd4b2e412fd7bda/sqlobject/main.py — this is /sqlobject/main.py file from commit 2ce5923 of SQLObject. User is sqlobject , repository is also sqlobject . 来源: https:/

How to use GitLab CI only:changes with only:refs?

一个人想着一个人 提交于 2019-12-11 14:41:58
问题 My .gitlab-ci.yml configuration has a job like: Lint dummy: stage: prepare tags: [my-tag] only: refs: [merge_requests] changes: [Thorfile] script: "/bin/true" The only difference from the real job is the tags . Everything else is exactly the same. Yes, when creating a merge request where Thorfile has not been changed, the "Lint dummy" job is still created. From the documentation as of 2019.03.14 (https://docs.gitlab.com/ee/ci/yaml/README.html#using-changes-with-merge_requests) With pipelines

how to pass value from commit to GitLab CI pipeline as variable?

前提是你 提交于 2019-12-11 12:50:23
问题 I need to dynamically pass value to GitLab CI pipeline to pass the value further to jobs. The problem is: the value cannot be stored in the code and no pipeline reconfiguration should be needed (e.g. I can pass the value in "variables" section of .gitlab-ci.yml but it means store value in the code, or changes in "Environment variables" section of "CI / CD Settings" means manual reconfiguration). Also, branch name cannot be used for that purpose too. It is not a secret string but a keyword

How do I use Let’s Encrypt with GitLab under Plesk on Subdomain?

Deadly 提交于 2019-12-11 12:49:21
问题 I got GitLab up and running, but currently it doesn't use SSL. I use the Let's Encrypt Plesk Extension to get free SSL Certificates in general. This is what my setup looks like: Plesk v12.5.30_build1205150826.19 os_Ubuntu 14.04 GitLab 8.8.5 Let's Encrypt Plesk Extension v1.6 Release 1 Plesk Subdomain: git.my-domain.com Plesk Apache & nginx Settings for git.my-domain.com: Additional directives for HTTP : <Location /> ProxyPass http://IP-of-my-domain:9999/ ProxyPassReverse http://IP-of-my

How to detect merged branches that were deleted in remote

人盡茶涼 提交于 2019-12-11 12:33:13
问题 I'm using Git and I'm trying to sync up my local branches with remote ones. I always keep a "master" and a "develop" branches in both local and remote repositories. When I create a new feature, I create a branch for it and name it like this: feature/my-new-feature-name. When I finish working on the feature, I commit and push all changes to remote repository (I use Gitlab for my remote repo). Then I merge the feature branch into develop branch and delete the source branch (the feature branch)

搭建私有代码管理平台(Gitlab)

偶尔善良 提交于 2019-12-11 11:19:44
如果英文还可以的同学可以直接看 官方英文文档 ,挺详细的。也可以直接看这篇博客,几乎每一步都有截图了,跟着一步一步操作搭起自己的gitlab很简单。 一、环境准备 先准备一台服务器,这里我使用的是阿里云的服务器。然后使用以下命令 查看一下您的操作系统是什么版本 的,等会部署gitlab的时候要根据操作系统的版本去选择对应的安装方式(如果服务器内存低于2G的估计很难玩得起来,gitlab还是比较吃内存的,你可以安装成功,但是访问的时候会一直报502)。 cat /etc/redhat-release 二、安装和配置必要的依赖项 这里要根据自己服务器操作系统的版本去选择不同的安装依赖的方式,从第一步可以看出我的操作系统是Centos 7,所以我这里就以Centos7为例。如果你系统的版本不一样,可以通过去 官网 查看一下对应的安装方式。 2.1 安装依赖 打开系统防火墙中的HTTP、HTTPS和SSH访问 sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd -

Handling CI with GitLab and Azure Kubernetes

故事扮演 提交于 2019-12-11 10:04:32
问题 Building a docker image using Docker in Docker is not working. before_script: - apt-get update && apt-get install -y apt-transport-https - apk add --update curl && rm -rf /var/cache/apk/ - curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl - chmod +x ./kubectl - mv ./kubectl /usr/local/bin/kubectl build: stage: build image: docker:dind services: - docker:dind variables:

Could not find 'bundler' (>= 0) among 0 total gem(s) (Gem::LoadError)

混江龙づ霸主 提交于 2019-12-11 09:59:51
问题 I'm trying to install gitlab on my vhost. It's an Ubuntu 14.04. The introduction tells me to run the command: sudo -u gitlab -H bundle install --deployment --without development test postgres aws kerberos But than I always get the error: /usr/local/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'bundler' (>= 0) among 0 total gem(s) (Gem::LoadError) Checked in 'GEM_PATH=/home/gitlab/.gem/ruby/2.2.0:/usr/local/lib/ruby/gems/2.2.0', execute `gem env` for more information