Riorita
Riorita

Reputation: 161

push package builded in Gitlab CI.Runner to Nexus repository

In Gitlab issue #19095 it's decided to leverage GL as package repository, but what should i do just now, until it's not done, for task: "try that Gitlab instead Jenkins+Nexus". From which place can I push package to Nexus?

  1. from gitlab-ci.yml
  2. using uploaded package from Runner using artifacts parameter gitlab-ci.yml https://about.gitlab.com/2015/11/22/gitlab-8-2-released/
  3. from Docker image using Maven may be
  4. via webhook
  5. using release tag?

Upvotes: 8

Views: 12831

Answers (1)

David Hunsicker
David Hunsicker

Reputation: 1240

The best answer I think you're going to find is that you need to write it into your gitlab yml script

NEXUS_USERNAME=admin 
NEXUS_PASSWORD=admin123 
NEXUS_SERVER=server.com/yourserver
NEXUS_REPOSITORY=raw 
echo "Sending backup to server"

curl -v -u ${NEXUS_USERNAME}:${NEXUS_PASSWORD} --upload-file ${UPLOAD_FILE} http://${NEXUS_SERVER}/repository/${NEXUS_REPOSITORY}/${UPLOAD_FILE}

Upvotes: 5

Related Questions