我已经用Docker插件设置了无人机。它构建得很好,但无法推送到私有的Dockerhub存储库。
我已经确认dockerhub_username和dockerhub_password是环境变量。
kind: pipeline
type: exec
name: default
steps:
- name: docker
image: plugins/docker
settings:
repo: jbc22/myrepo
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
publish:
image: jbc22/myrepo
report: jbc22/myrepo
无人机返回:denied: requested access to the resource is denied
time="2019-09-03T19:34:32Z" level=fatal msg="exit status 1"
我希望看到图像被推送到 Dockerhub。
刚刚修复了同样的问题...下面的代码对我有用!
name: default
kind: pipeline
steps:
- name: backend
image: python:3.7
commands:
- pip3 install -r req.txt
- python manage.py test
- name: publish
image: plugins/docker
settings:
username: dockerhub_username
password: dockerhub_password
repo: user/repo_name