簡體   English   中英

Spring 項目的 Maven 項目 gitlab CD 部署期間在 Z3115FB34DFCB5BA87349707C5ZB6 上出現引導錯誤

[英]Maven project for Spring Boot error during gitlab CD deployment on heroku

我想使用 CI/CD gitlab 管道在 heroku 上部署 spring 引導應用程序。 這是我的 yaml 文件。

stages:
  - build
  - test
  - production

variables:
  MAVEN_OPTS: "-Dmaven.repo.local=${CI_PROJECT_DIR}/.m2"
  MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
  POSTGRES_DB: test
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: postgres

.only-default: &only-default
  only:
    - develop
    - merge_requests
    - tags

build-app:
...

unit-tests:
...

integration-tests:
...

build-preprod-package:
  image: maven:latest
  stage: production
  script:
      - cd source_code
      - mvn package -P preprod
  only:
      - master

preprod:
  type: deploy
  stage: production
  image: ruby:latest
  script:
      - apt-get update -yq
      - apt-get install -y ruby-dev
      - gem install dpl
      - dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY
  only:
      - master

這是我的項目結構。 在此處輸入圖像描述

我在 heroku https://github.com/heroku/heroku-maven-plugin.git上添加了 buildpack 在執行 CD 過程期間收到錯誤消息。

App not compatible with buildpack: https://github.com/heroku/heroku-maven-plugin.git

問題是由於 Heroku 上帶有 jdk 11 的 maven 的構建包無效。

暫無
暫無

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

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