gitlab-ci-runner

Use GitLab API from a GitLabCI build script

我与影子孤独终老i 提交于 2020-06-24 08:21:27
问题 I have a GitLab CI build script like this: create release: stage: deploy tags: - basic only: - tags script: - GITLOG=$(echo "# Changes Log"; git log `git tag | tail -2 | head -1`..${CI_BUILD_TAG} --pretty=format:" - %s") - curl -X POST -d "private_token=$CI_BUILD_TOKEN&description=$GITLOG" "http://git.example.com/api/v3/projects/${CI_PROJECT_ID}/repository/tags/${CI_BUILD_TAG}/release" The purpose of this step is to automatically add a Changes Log from Git in the GitLab Releases section. That

Gitlab CI - ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows

隐身守侯 提交于 2020-05-27 04:32:42
问题 Getting this error while running Gitlab CI pipeline. As I understand the error says that I'm trying to run a Linux type docker image on a windows docker-engine? But the thing is I'm using a windows docker image. What could be the problem? ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows My CI: image: hello-world:nanoserver stages: - build build1: stage: build script: - echo "Hello world" 回答1: What's the difference between "Shared" and "Simple"

Gitlab CI - ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows

自作多情 提交于 2020-05-27 04:31:26
问题 Getting this error while running Gitlab CI pipeline. As I understand the error says that I'm trying to run a Linux type docker image on a windows docker-engine? But the thing is I'm using a windows docker image. What could be the problem? ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows My CI: image: hello-world:nanoserver stages: - build build1: stage: build script: - echo "Hello world" 回答1: What's the difference between "Shared" and "Simple"

Gitlab CI - ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows

可紊 提交于 2020-05-27 04:31:10
问题 Getting this error while running Gitlab CI pipeline. As I understand the error says that I'm trying to run a Linux type docker image on a windows docker-engine? But the thing is I'm using a windows docker image. What could be the problem? ERROR: Job failed: executor requires OSType=linux, but Docker Engine supports only OSType=windows My CI: image: hello-world:nanoserver stages: - build build1: stage: build script: - echo "Hello world" 回答1: What's the difference between "Shared" and "Simple"

Unable to access docker-compose containers created inside docker

强颜欢笑 提交于 2020-05-25 06:11:56
问题 I have a docker-compose.yml file that starts up a simple HTTP echo service on port 8800 . version: '2' services: echo-server: image: luisbebop/echo-server container_name: echo-server ports: - "8800:8800" Super simple stuff. If I run docker-compose up and run on my local machine: echo "Hello World" | nc 127.0.0.1 8800 Then I see the echo. However: If I run this same compose scenario inside a docker container, through the GitLab runner, it fails. I've tried to garner attention for this issue at

How to trigger a specific job in gitlab

那年仲夏 提交于 2020-05-15 08:38:06
问题 I want to run a specific job in a pipeline , I thought assigning a tag for the job and then specifying this tag again in the post method will fulfill my needs .The problem is when I trigger using the api(post) , all the jobs in the pipeline are triggered event though only one of this tagged . gitlab-ci.yml : job1: script: - echo "helloworld!" tags : [myTag] job2: script: - echo "hello gitlab!" the api call : curl -X POST -F token="xxx" -F ref="myTag" https://gitlab.com/api/v4/projects

GitLab Runner on VM with internal network only

你。 提交于 2020-04-11 07:38:49
问题 I'm running a GitLab instance from the official jetstack helm chart on my GKE cluster within the Google Cloud. I would like to add a Windows VM to my VPC network that has only internal network access. Normally you have to register the GitLab runner against the https address of GitLab which is not possible with an internal network. Is there a way to register the GitLab runner against the GitLab instance via the internal network? The GitLab instance has its https resource published via an nginx

How to run a gitlab-ci.yml job only on a tagged branch?

你。 提交于 2020-04-07 11:27:20
问题 How do I run a .gitlab-ci.yml job only on a tagged Master branch? job: script: - echo "Do something" only: - master - tags The above code will run if either condition exists: a Master branch or a tagged commit. My goal is to have this run for a production deploy, but it would require that it be on the Master branch and that it be tagged (with a version). Otherwise, I'll have another job that will push to staging if its missing a tag. 回答1: This behavior will be introduced in version 12. Open

How to run a gitlab-ci.yml job only on a tagged branch?

随声附和 提交于 2020-04-07 11:26:11
问题 How do I run a .gitlab-ci.yml job only on a tagged Master branch? job: script: - echo "Do something" only: - master - tags The above code will run if either condition exists: a Master branch or a tagged commit. My goal is to have this run for a production deploy, but it would require that it be on the Master branch and that it be tagged (with a version). Otherwise, I'll have another job that will push to staging if its missing a tag. 回答1: This behavior will be introduced in version 12. Open

How can I securely push from a GitLab Runner KubernetesExecutor pod to a private container registry?

青春壹個敷衍的年華 提交于 2020-03-23 12:04:54
问题 Goal Build a CI/CD pipeline multiple GitLab repositories with a certain project structure can make use of. For this, a Docker container with Python code is built and subsequently securely pushed to Google Cloud's Container Registry. Set up KubernetesExecutor is installed on Kubernetes Engine using the Helm chart as provided by GitLab. The base image for the build process ( runners.image in the values.yaml ) is a custom one as this helps automatically containerising the provided repository.