gitlab-ci

Read webhook payload in Gitlab CI

↘锁芯ラ 提交于 2020-08-24 10:19:29
问题 I have a project ( PROJECT_A ) that is triggered through a webhook, and expects the variable $PRODUCT to be set. Its value is used to trigger a certain path in the build. The job in the .gitlab-ci.yml file looks like this: deploy: stage: publish script: - ./generate_doc.sh $PRODUCT A webhook call looks like this: http://<GITLAB_URL>/api/v4/projects/710/ref/master/trigger/pipeline?token=<TOKEN>&variables[PRODUCT]=<PRODUCT> I call this trigger through a webhook from other projects, including

How to trigger job on specific job failure using “when: on_failure”?

时光总嘲笑我的痴心妄想 提交于 2020-08-10 23:20:48
问题 I am working on CICD and for some reason, we want to trigger a job on another job failure. In yaml file, I have specified "when: on_failure" but I am not able to find a solution to specify job name. Something like: "when: on_failure: Job_Name". Now, my 'on failure' job runs on any job failure. 回答1: If job1 is the first job which may fail and job2 is the next one which should be triggered then I'd suggest the following plan: execute job2 always with no regards if any of previous jobs failed or

How to trigger job on specific job failure using “when: on_failure”?

六月ゝ 毕业季﹏ 提交于 2020-08-10 23:19:16
问题 I am working on CICD and for some reason, we want to trigger a job on another job failure. In yaml file, I have specified "when: on_failure" but I am not able to find a solution to specify job name. Something like: "when: on_failure: Job_Name". Now, my 'on failure' job runs on any job failure. 回答1: If job1 is the first job which may fail and job2 is the next one which should be triggered then I'd suggest the following plan: execute job2 always with no regards if any of previous jobs failed or

codeceptjs tests 'before each' hook error fails to launch chrome. tests were working fine a week ago

拥有回忆 提交于 2020-08-10 18:51:17
问题 I asked this question several months ago here but the solution was obviously not helpful because here I am again with the exact same problem. in that link I was told to change my image from node:latest to node:13 . this no longer fixes the problem. I have tried every version of node and none work. I have tried using premade images of puppeteer/codeceptjs but that does not work. here's the problem: 4 months ago I coded a bunch of tests. they worked fine so i set them up on gitlab to run

codeceptjs tests 'before each' hook error fails to launch chrome. tests were working fine a week ago

谁说胖子不能爱 提交于 2020-08-10 18:51:11
问题 I asked this question several months ago here but the solution was obviously not helpful because here I am again with the exact same problem. in that link I was told to change my image from node:latest to node:13 . this no longer fixes the problem. I have tried every version of node and none work. I have tried using premade images of puppeteer/codeceptjs but that does not work. here's the problem: 4 months ago I coded a bunch of tests. they worked fine so i set them up on gitlab to run

Service account does not have storage.buckets.lists access to project while pushing images to GCR via Gitlab CI

三世轮回 提交于 2020-08-10 05:01:52
问题 I am using Gitlab CI to build docker images and to push them to GCR. My Script goes like this - build: image: google/cloud-sdk services: - docker:dind stage: build cache: script: - echo "$GCP_SERVICE_KEY" > gcloud-service-key.json # Google Cloud service accounts - gcloud auth activate-service-account --key-file gcloud-service-key.json - gcloud auth configure-docker --quiet - gcloud config set project $GCP_PROJECT_ID - echo ${IMAGE_NAME}:${IMAGE_TAG} - PYTHONUNBUFFERED=1 gcloud builds submit

Git lab CI Running nose tests with SqlAlchemy. ERROR: Failure: TypeError (can't apply this __setattr__ to DefaultMeta object)

强颜欢笑 提交于 2020-08-09 18:22:25
问题 I am working on a Flask Application with a Postgres database. When I run nose tests locally everything works fine, but when I upload the code to GitLab this happens in my pipeline. I am using gitlab-ci . Any suggestions on how to solve this issue are welcome. $ nosetests --with-coverage --cover-package=app EEEEE ====================================================================== ERROR: Failure: TypeError (can't apply this __setattr__ to DefaultMeta object) ---------------------------------

Git lab CI Running nose tests with SqlAlchemy. ERROR: Failure: TypeError (can't apply this __setattr__ to DefaultMeta object)

无人久伴 提交于 2020-08-09 18:17:29
问题 I am working on a Flask Application with a Postgres database. When I run nose tests locally everything works fine, but when I upload the code to GitLab this happens in my pipeline. I am using gitlab-ci . Any suggestions on how to solve this issue are welcome. $ nosetests --with-coverage --cover-package=app EEEEE ====================================================================== ERROR: Failure: TypeError (can't apply this __setattr__ to DefaultMeta object) ---------------------------------

Docker build failed: tag invalid reference format (Gitlab CI)

淺唱寂寞╮ 提交于 2020-08-09 10:00:47
问题 I've created a repo in gitlab for a Dockerfile. In the .gitlab-ci.yml i defined two stages: build and push to the registry. This is the .gitlab-ci.yml file: image: docker stages: - build - push build: stage: build script: - docker build --no-cache -t ${DOCKER_REGISTRY}/debian9-cunit . push: stage: push script: - docker push ${DOCKER_REGISTRY}/debian9-cunit When I run the pipeline, the build stage fails saying: invalid argument "/debian9-cunit" for "-t, --tag" flag: invalid reference format