A
A
Andrew Vityuk2017-03-01 10:20:05
git
Andrew Vityuk, 2017-03-01 10:20:05

How to build a private container in gitlab via drone io?

Hello. We work for gitlab.com. We have all repos private there. The drone is installed via docker and configured to use the gitlab repo. I want to make the drone automatically collect the container after git push. The documentation says how to do this, here is an example of a .drone.yml file

pipeline:
docker:
image: plugins/docker
repo: registry.gitlab.com/my_repo
registry: registry.gitlab.com
username: user
password: password
email: email

so here's how to make it so that you do not enter the username and password in the file. I tried to set different variables instead of user and password (for example, $REGISTRY_USERNAME and $REGISTRY_PASSWORD and in the drone itself I wrote $REGISTRY_USERNAME=user and $REGISTRY_PASSWORD=mypassword in Env) so I don’t want to substitute login and password and an authorization error pops up. If you register a login and password, then everything is going, but somehow you don’t want to register a login and password from gitlab in the file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dgk, 2017-05-29
@z_i_z_u

drone 0.6 has a tool for such tasks: docs.drone.io/manage-secrets

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question