包装Docker以使用Gitlab生成变量运行
dockerwithgitlabsecrets的Python项目详细描述
|搭建状态codecoov.io pypi版本
docker与gitlab机密的docker与gitlab秘秘秘的docker
===============
*将docker与gitlab构建变量一起运行。*
安装
=
=
=>先决条件:python>;=3.6-docker
(一)有权使用;https://pypi.python.org/pypi/dockerWithGitlabSecrets>;``你:
…代码::bash
$pip安装dockerWithGitlabSecrets
Bleeding Edge版本可以直接从Github安装:
…代码::bash
$pip install git+https://github.com/wtsi hgi/docker with gitlab secrets.git@commit_id_or_branch_or_tag_egg=dockerWithGitlab secrets
用法
----
代码::bash
用法:docker with gitlab secrets[-h][--dwgs-config-dwgs-config-dwgs-config]
[--dwgs-project-dwgs-project-dwgs-project]
[--env-file-env-file]
docker with gitlab secrets
-帮助显示此帮助消息并退出
-DWGS配置文件DWGSSCONFIG
配置文件的位置(默认为
/用户/CN13/ .DWGS CONFIG.YML)
-DWGS项目DWGSX项目
GITLAB项目(如果没有命名空间的话)表单
“namespace/project”,将使用在配置文件中定义的默认命名空间。如果未定义,
将使用配置文件中的默认项目
示例
~~~~~~~~~~
使用gitlab项目的机密运行新容器:
。代码::bash
docker with gitlab secrets--dwgs config my-config.yml--dwgs project my project\
run--rm alpin printenv gitlab_secret
代码::bash
docker with gitlab secrets--dwgs config my-config.yml\
version
以交互方式运行一个容器,该容器将包含gitlab
环境中项目的机密:
。代码::bash
docker with gitlab secrets--dwgs config my-config.yml--dwgs project my project\
run--rm-it ubuntu
configuration
--
示例:
……代码::yml
gitlab:
url:https://gitlab.example.com
token:my token
project:hgi systems\如果指定了'dwgs project'
名称空间:hgi可选默认名称空间
已知问题
---------
-docker`不能通过
`--env file`<;https://github.com/moby/moby/issues/12997>在变量中传递换行符,则将重写该值;`_.
因此,具有换行符的多行Gitlab变量将其换行符
转义到\\n.
…|构建状态图像::https://travis ci.org/wtsi hgi/docker with gitlab secrets.svg
:目标:https://travis ci.org/wtsi hgi/docker with gitlab secrets
。| codecov.io图像::https://codecov.io/gh/wtsi hgi/docker with gitlab secrets/graph/badge.svg
:目标:https://codecov.io/github/wtsi hgi/docker with gitlab secrets
。| pypi版本image::https://badge.fury.io/py/dockerWithGitlabSecrets.svg
:目标:https://badge.fury.io/py/dockerWithGitlabSecrets
docker与gitlab机密的docker与gitlab秘秘秘的docker
===============
*将docker与gitlab构建变量一起运行。*
安装
=
=
=>先决条件:python>;=3.6-docker
(一)有权使用;https://pypi.python.org/pypi/dockerWithGitlabSecrets>;``你:
…代码::bash
$pip安装dockerWithGitlabSecrets
Bleeding Edge版本可以直接从Github安装:
…代码::bash
$pip install git+https://github.com/wtsi hgi/docker with gitlab secrets.git@commit_id_or_branch_or_tag_egg=dockerWithGitlab secrets
用法
----
代码::bash
用法:docker with gitlab secrets[-h][--dwgs-config-dwgs-config-dwgs-config]
[--dwgs-project-dwgs-project-dwgs-project]
[--env-file-env-file]
docker with gitlab secrets
-帮助显示此帮助消息并退出
-DWGS配置文件DWGSSCONFIG
配置文件的位置(默认为
/用户/CN13/ .DWGS CONFIG.YML)
-DWGS项目DWGSX项目
GITLAB项目(如果没有命名空间的话)表单
“namespace/project”,将使用在配置文件中定义的默认命名空间。如果未定义,
将使用配置文件中的默认项目
示例
~~~~~~~~~~
使用gitlab项目的机密运行新容器:
。代码::bash
docker with gitlab secrets--dwgs config my-config.yml--dwgs project my project\
run--rm alpin printenv gitlab_secret
代码::bash
docker with gitlab secrets--dwgs config my-config.yml\
version
以交互方式运行一个容器,该容器将包含gitlab
环境中项目的机密:
。代码::bash
docker with gitlab secrets--dwgs config my-config.yml--dwgs project my project\
run--rm-it ubuntu
configuration
--
示例:
……代码::yml
gitlab:
url:https://gitlab.example.com
token:my token
project:hgi systems\如果指定了'dwgs project'
名称空间:hgi可选默认名称空间
已知问题
---------
-docker`不能通过
`--env file`<;https://github.com/moby/moby/issues/12997>在变量中传递换行符,则将重写该值;`_.
因此,具有换行符的多行Gitlab变量将其换行符
转义到\\n.
…|构建状态图像::https://travis ci.org/wtsi hgi/docker with gitlab secrets.svg
:目标:https://travis ci.org/wtsi hgi/docker with gitlab secrets
。| codecov.io图像::https://codecov.io/gh/wtsi hgi/docker with gitlab secrets/graph/badge.svg
:目标:https://codecov.io/github/wtsi hgi/docker with gitlab secrets
。| pypi版本image::https://badge.fury.io/py/dockerWithGitlabSecrets.svg
:目标:https://badge.fury.io/py/dockerWithGitlabSecrets