Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

257
Vistas
Push JHipster 6.0.1 to Gitlab repository

After having everything ready to deploy, I realized JHipster doesn't have a Dockerfile anymore and the packaging is done with jib. The generated gitlab-ci.yml has a docker-push stage with a command like this:

./mvnw jib:build -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token  -Djib.to.auth.password=$CI_BUILD_TOKEN

but it fails with

[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.11:build (default-cli) on project test-project: Obtaining project build output files failed; make sure you have compiled your project before trying to build the image. (Did you accidentally run "mvn clean jib:build" instead of "mvn clean compile jib:build"?): /builds/amatos/test-project/target/classes -> [Help 1]

As that failed, I tried to run the command locally like this:

./mvnw jib:build -Djib.to.image=registry.gitlab.com/amatos/test-project:v6.0.1 -Djib.to.auth.username=amatos -Djib.to.auth.password=password

but instead of trying to connect to Gitlab's registry, it tries to connect to registry.hub.docker.com:

[INFO] Retrieving registry credentials for registry.hub.docker.com...

What I would like to know is: how do I set it to connect to Gitlab instead of Docker Hub?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

In order to connect to a custom repository, I changed -Djib.to.image to -Dimage and it worked

over 4 years ago · Santiago Trujillo Denunciar

0

This is followed by jhipster/generator-jhipster issue 9761 which states:

as the docker-push is done in another stage, there is a missing - target/classes in the previous stage.
It is needed by jib. It should look like:

maven-package:
  stage: package
  script:
    - ./mvnw verify -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME
  artifacts:
    paths:
      - target/*.jar
      - target/classes
    expire_in: 1 day

Possibly addressed by PR (merged) 9762, commit 50cc009, which is only in master, not yet referenced by any tag.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda