簡體   English   中英

Gitlab CI/CD 與 JHipster 和 Docker 注冊表

[英]Gitlab CI/CD with JHipster and Docker registry

我制作了一個 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

這是 my.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

編輯:有一個未配置的變量。 現在我明白了

 [ERROR] I/O error for image [10.1.10.58:5000/powerfront]:
 [ERROR]     javax.net.ssl.SSLException
 [ERROR]     Unrecognized SSL message, plaintext connection?

我如何告訴跑步者接受不安全的(明文)連接?

要發布到私有(或其他公共)注冊表,您的映像名稱必須以注冊表的主機名開頭: private.registry.io/group/image:version :version 以便 Docker 守護進程知道它不會推送到 Docker Hub (默認)但到private.registry.io

您也可以使用Kaniko發布您的圖像,因為它不需要 Docker 守護程序上的 dind 或特權模式。

我不確定這是 Gitlab CI 問題。 但與 JHipster。
CI_REGISTRY_IMAGE的值是多少? 我們看不到錯誤消息中的值。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM