grim/convey

7ad47db70844
Parents df9894c04929
Children 86643e4fda89
Add an example of login/logout with the environment
--- a/REFERENCE.md Thu Sep 21 15:28:02 2017 -0500
+++ b/REFERENCE.md Thu Sep 21 15:28:51 2017 -0500
@@ -41,6 +41,10 @@
This example shows how to have one file extend another, inheriting all of the plans and tasks that are
not otherwise overwritten by the configuration file.
+## login-logout.yml
+
+This examples show how you can login and logout of a Docker registry by using environment variables.
+
## script.yml
This example shows how to use the script attribute of a run task.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/login-logout.yml Thu Sep 21 15:28:51 2017 -0500
@@ -0,0 +1,20 @@
+environment:
+ - DOCKER_REGISTRY=registry
+ - DOCKER_USERNAME=username
+ - DOCKER_PASSWORD=password
+tasks:
+ login:
+ type: login
+ server: ${DOCKER_REGISTRY}
+ username: ${DOCKER_USERNAME}
+ password: ${DOCKER_PASSWORD}
+ logout:
+ type: logout
+ server: ${DOCKER_REGISTRY}
+plans:
+ default:
+ stages:
+ - tasks:
+ - login
+ - logout
+