简体   繁体   English

为什么我会清理基于文件的变量 00:01 错误:作业失败:gitlab 管道创建中的退出代码 1

[英]why im getting Cleaning up file based variables 00:01 ERROR: Job failed: exit code 1 in gitlab pipeline creation

commit-message-validator: stage: validate-commit-message script: - echo "$CI_COMMIT_MESSAGE" - echo "$CI_COMMIT_BRANCH" - echo "check the Prefix of the commit message should have one of 'fix' || 'feat' || 'major' || 'minor' in case sensitive" - exit 1 commit-message-validator: stage: validate-commit-message script: - echo "$CI_COMMIT_MESSAGE" - echo "$CI_COMMIT_BRANCH" - echo "检查提交消息的前缀应该是 'fix' || 'feat' | | 'major' || 'minor' 区分大小写" - 出口 1

rules: - if: $CI_COMMIT_MESSAGE =~ /fix: / when: never - if: $CI_COMMIT_MESSAGE =~ /feat: / when: never - if: $CI_COMMIT_MESSAGE =~ /major: / when: never - if: $CI_COMMIT_MESSAGE =~ /minor: / when: never - if: "$CI_COMMIT_MESSAGE =~ /^chore\(release\):.*/" when: never - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: never - when: always规则: - if: $CI_COMMIT_MESSAGE =~ /fix: / when: never - if: $CI_COMMIT_MESSAGE =~ /feat: / when: never - if: $CI_COMMIT_MESSAGE =~ /major: / when: never - if: $CI_COMMIT_MESSAGE = ~ /minor: / when: never - if: "$CI_COMMIT_MESSAGE =~ /^chore\(release\):.*/" when: never - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: never - when: always

enter image description here在此处输入图像描述

The last step in your script block is exit 1 . script块中的最后一步是exit 1 Gitlab CI will fail any job that has an exit code > 0. Gitlab CI 将失败任何退出代码 > 0 的作业。

The commit-message-validator job doesn't currently do any checks, it simply calls echo 3 times. commit-message-validator作业目前不做任何检查,它只是调用echo 3 次。 If you want it to check for fix, feat, major, minor you will need to do write some logic in the script block to do so.如果您希望它检查fix, feat, major, minor您需要在script块中编写一些逻辑来执行此操作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 清理项目目录和基于文件的变量 00:01 错误:作业失败:退出代码 1 - Cleaning up project directory and file based variables 00:01 ERROR: Job failed: exit code 1 Gitlab CI/CD 在“清理项目目录和基于文件的变量”时失败并显示“错误:作业失败:退出代码 1” - Gitlab CI/CD fails while "Cleaning up project directory and file based variables" with "ERROR: Job failed: exit code 1" 清理基于文件的变量。 错误:作业失败:退出代码 1 - Cleaning up file based variables. ERROR: Job failed: exit code 1 Gitlab 管道在“清理项目目录和基于文件的变量”时失败 - Gitlab pipeline failing on "Cleaning up project directory and file based variables" 为什么 Gitlab 作业失败了? 没有这样的文件或目录错误:作业失败:退出状态 1 - Why did Gitlab job fail? No such file or directory ERROR: Job failed: exit status 1 谁能告诉我为什么我从 GitLab 收到此“错误:作业失败:退出代码 1”消息? - Can anyone tell me why I get this 'ERROR: Job failed: exit code 1' message from GitLab? Laravel Gitlab CI/CD,错误:作业失败:退出代码 1 - Laravel Gitlab CI/CD, ERROR: Job failed: exit code 1 Gitlab CI 失败并出现错误:作业失败:退出代码 1 - Gitlab CI fails with ERROR: Job failed: exit code 1 gitlab ci/cd 错误:作业失败:chmod og= $STAGE_ID_RSA 上的退出代码 1 - gitlab ci/cd ERROR: Job failed: exit code 1 on chmod og= $STAGE_ID_RSA GitLab CI。 作业失败并出现错误:错误:作业失败:退出状态 9009 - GitLab CI. Job failed with error: ERROR: Job failed: exit status 9009
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM