-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secret in Drone 1.0.0-rc.1 #130
Comments
- name: ssh
image: appleboy/drone-ssh
settings:
host: host.com
username:
from_secret: ssh_user
password:
from_secret: ssh_password
port: 22
script:
- docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} repo.com see the kind: pipeline
name: default
steps:
- name: build
image: golang
commands:
- go build
- go test
- name: notify
image: plugins/slack
settings:
room: general
webhook: https://... |
You do not understand me. I need to read the secrets of the drone in the script block for authorization in my docker repository. In Drone version 0.0.5, this worked with the |
I have the same problem.
Example from documentation does not work for version 1.0.0 rc.1 |
^_^ I have solved it.
|
@v7lin
|
@coltenkrauter |
That did it, thanks @v7lin |
thanks @v7lin ,the |
I have a similar problem, echo secret var like *******, causes docker login password error, using drone v1.6.0: .drone.yml: - name: deploy
image: appleboy/drone-ssh
environment:
DOCKER_USER: mmd
DOCKER_PASS:
from_secret: docker_pass
settings:
host: mario6.me
port: 6722
username:
from_secret: ssh_user_host1
password:
from_secret: ssh_pass_host1
command_timeout: 2m
envs: [ DOCKER_USER, DOCKER_PASS ]
script:
- export DOCKER_REGISTRY=registry.cn-chengdu.aliyuncs.com
- export DOCKER_IMAGE=registry.cn-chengdu.aliyuncs.com/lkqm/paper-show:${DRONE_TAG=latest}
- export DOCKER_REGISTRY_USER=$DOCKER_USER
- export DOCKER_REGISTRY_PASS=$DOCKER_PASS
- export PATH=/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
- echo $DOCKER_USER
- echo ${DOCKER_USER}
- echo $${DOCKER_USER}
- echo $DOCKER_PASS
- echo ${DOCKER_PASS}
- echo $${DOCKER_PASS}
- sh /tmp/paper-show/drone/deploy.sh
when:
event:
- tag |
@lkqm Do you want to upload docker image to aliyuncs? |
No, I need pull docker image from aliyuncs private repository in remote ssh host, so I need password to login aliyuncs registry. |
@appleboy so sorry, I am try again, it's work now, may be is password wrong |
How to use secrets in script?
Drone version 1.0.0-rc.1
Example from documentation does not work for version 1.0.0 rc.1
The text was updated successfully, but these errors were encountered: