具有JHipster和Docker注册表的Gitlab CI / CD

问题描述 投票:0回答:1

我制作了一个JHipster应用程序,我想添加一个带有私有Gitlab运行程序的CI / CD,以部署在私有Docker注册表上。我收到此失败消息:

[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.0.0:build (default-cli) on project powerfront: Invalid image reference :master-35274d52bd71e28f08a0428832001cc67e9c446d, perhaps you should check that the reference is formatted correctly according to https://docs.docker.com/engine/reference/commandline/tag/#extended-description
 [ERROR] For example, slash-separated name components cannot have uppercase letters: Invalid image reference: :master-35274d52bd71e28f08a0428832001cc67e9c446d

这是我的.gitlab-ci.yml的相关部分

# Uncomment the following line to use gitlabs container registry. You need to adapt the REGISTRY_URL in case you are not using gitlab.com
docker-push:
    stage: release
    variables:
        REGISTRY_URL: 10.1.10.58
        IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA
    dependencies:
        - maven-package
    script:
        - ./mvnw -ntp compile jib:build -Pprod -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token  -Djib.to.auth.password=$CI_BUILD_TOKEN -Dmaven.repo.local=$MAVEN_USER_HOME

编辑:有一个未配置的变量。现在我得到

 [INFO] Using credentials from <to><auth> for powerfront:master-2d7a8c508c255a569d942b4cab9c0e03bf3e084a
...
Unauthorized for registry-1.docker.io/library/powerfront: 401 Unauthorized
 [ERROR] {"details":"incorrect username or password"}
docker jhipster gitlab-ci docker-registry
1个回答
0
投票

我不确定这是一个gitlabci问题,但使用三角臂。CI_REGISTRY_IMAGE的值是多少?我们在错误消息中看不到该值。

© www.soinside.com 2019 - 2024. All rights reserved.