gitlab-ci

How to make GitLab's CI/CD job fail based on text in console output?

99封情书 提交于 2020-06-29 03:54:14
问题 I am using Lerna to manage a multipackage repository and in my deployment job I use Lerna's publish command. For me if code is changed in a package it should always publish a new version to our Artifactory and fail the job if nothing was published, but the publish command will exit with success code (I guess it's 0 code) even when no packages where published: $ npx lerna publish from-package --yes lerna notice cli v3.13.1 lerna info ci enabled lerna notice from-package No unpublished release

How to make GitLab's CI/CD job fail based on text in console output?

天大地大妈咪最大 提交于 2020-06-29 03:54:05
问题 I am using Lerna to manage a multipackage repository and in my deployment job I use Lerna's publish command. For me if code is changed in a package it should always publish a new version to our Artifactory and fail the job if nothing was published, but the publish command will exit with success code (I guess it's 0 code) even when no packages where published: $ npx lerna publish from-package --yes lerna notice cli v3.13.1 lerna info ci enabled lerna notice from-package No unpublished release

how to mask AWS_SECRET_ACCESS_KEY in gitlab-ci

若如初见. 提交于 2020-06-27 02:54:28
问题 In my Gitlab CI, I need to push a docker image to AWS ECR, so I need AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY . In Gitlab, when I go in Settings > CI / CD > Variables, I can put my variables, but I won't be able to mask AWS_SECRET_ACCESS_KEY as stated in the docs: The value must be in a single line. The value must not have escape characters. The value must not use variables. The value must not have any whitespace. The value must be at least 8 characters long. The SECRET has a format like

how to mask AWS_SECRET_ACCESS_KEY in gitlab-ci

筅森魡賤 提交于 2020-06-27 02:53:59
问题 In my Gitlab CI, I need to push a docker image to AWS ECR, so I need AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY . In Gitlab, when I go in Settings > CI / CD > Variables, I can put my variables, but I won't be able to mask AWS_SECRET_ACCESS_KEY as stated in the docs: The value must be in a single line. The value must not have escape characters. The value must not use variables. The value must not have any whitespace. The value must be at least 8 characters long. The SECRET has a format like

how to mask AWS_SECRET_ACCESS_KEY in gitlab-ci

谁都会走 提交于 2020-06-27 02:52:39
问题 In my Gitlab CI, I need to push a docker image to AWS ECR, so I need AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY . In Gitlab, when I go in Settings > CI / CD > Variables, I can put my variables, but I won't be able to mask AWS_SECRET_ACCESS_KEY as stated in the docs: The value must be in a single line. The value must not have escape characters. The value must not use variables. The value must not have any whitespace. The value must be at least 8 characters long. The SECRET has a format like

Using gitLab-CI for Qt-Projects

扶醉桌前 提交于 2020-06-25 03:43:43
问题 I want to use gitLab-CI for a Qt-project, but i can't figure out, what I need to do so. I understand, that the whole pipeline process takes place on the CI-Server, but how do I setup the needed requirements like the qt-environment? Solution: Ok now I got it! You just use the Runner for it, if you do not have a Server, you can use a VM. 回答1: For GitLab.com The runners are already set up (shared runners). You need to use a Qt SDK Docker image or install it yourself: Use image: <image-name> for

How do I push to a repo from within a gitlab CI pipeline?

时光怂恿深爱的人放手 提交于 2020-06-24 21:29:47
问题 In my CI pipeline I am generating an artifact public/graph.png that visualises some aspect of my code. In a later step I want to commit that to the repo from within the CI pipeline. Here's the pertinent part of .gitlab-ci.yml : commit-graph: stage: pages script: - git config user.email "cipipeline@example.com" - git config user.name "CI Pipeline" - cd /group/project - mv public/graph.png . - git add graph.png - git commit -m "committing graph.png [ci skip]" - echo $CI_COMMIT_REF_NAME - git

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

How to force GitLab to run a complete pipeline before starting a new one?

半城伤御伤魂 提交于 2020-06-12 07:40:26
问题 I have one runner associated with my project to avoid concurrent build. GitLab to process the complete pipeline before start a new one? concurrent is set to = 1 (config file of the runner) before_script: - echo %CI_COMMIT_SHA% - echo %CI_PROJECT_DIR% stages: - createPBLs - build - package create PBLs: stage: createPBLs script: - md "C:\HierBauen\%CI_COMMIT_SHA%\" - xcopy /y /s "C:/Bauen" "C:/HierBauen/%CI_COMMIT_SHA%" - xcopy /y /s "%CI_PROJECT_DIR%" "C:\HierBauen\%CI_COMMIT_SHA%" - cd "C:

MongoDB server doesn't start at gitlab runner using gitlab-ci

喜你入骨 提交于 2020-05-28 07:46:28
问题 right now I'm in the middle at developing an application using Ruby and Mongo. But I got stuck when I deploy the application using gitlab-ci where it seems that mongo server doesn't start at test environment on gitlab runner. Here are my gitlab-ci.yml stages : - test - deploy services: - mongo:latest unitTest:API: image: ruby:2.6.10 stage: test cache: paths: - API/vendor/ before_script: - ruby -v - gem install bundler --no-ri --no-rdoc - bundle install --gemfile=API/Gemfile --path vendor