From 3fe30975e8d272b2e52c07895cecd1ea502eb29b Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Wed, 31 Jul 2019 09:52:01 -0700 Subject: [PATCH 1/2] Explain publishing images insecurely in pipeline docs --- .../en/k8s-in-rancher/pipelines/_index.md | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md b/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md index 1adea803734..b74ba067390 100644 --- a/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md +++ b/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md @@ -315,6 +315,10 @@ stages: The **Build and Publish Image** step builds and publishes a Docker image. This process requires a Dockerfile in your source code's repository to complete successfully. +_Available as of Rancher v2.1.0_ + +The option to publish an image to an insecure registry is not exposed in the UI, but you can specify an environment variable in the YAML that allows you to publish an image insecurely. + {{% tabs %}} {{% tab "By UI" %}} @@ -332,9 +336,23 @@ The **Build and Publish Image** step builds and publishes a Docker image. This p {{% /tab %}} {{% tab "By YAML" %}} + +You can use specific arguments for Docker daemon and the build. They are not exposed in the UI, but they are available in pipeline YAML format, as indicated in the example above. Available environment variables include: + +Variable Name | Description +------------------------|------------------------------------------------------------ +PLUGIN_DRY_RUN | Disable docker push +PLUGIN_DEBUG | Docker daemon executes in debug mode +PLUGIN_MIRROR | Docker daemon registry mirror +PLUGIN_INSECURE | Docker daemon allows insecure registries +PLUGIN_BUILD_ARGS | Docker build args, a comma separated list +
```yaml -# example +# This example shows an environment variable being used +# in the Publish Image step. This variable allows you to +# publish an image to an insecure registry: + stages: - name: Publish Image steps: @@ -344,17 +362,9 @@ stages: tag: repo/app:v1 pushRemote: true registry: example.com + env: + PLUGIN_INSECURE: "true" ``` - -You can use specific arguments for Docker daemon and the build. They are not exposed in the UI, but they are available in pipeline YAML format, as indicated in the example above. Available variables includes: - -Variable Name | Description -------------------------|------------------------------------------------------------ -PLUGIN_DRY_RUN | Disable docker push -PLUGIN_DEBUG | Docker daemon executes in debug mode -PLUGIN_MIRROR | Docker daemon registry mirror -PLUGIN_INSECURE | Docker daemon allows insecure registries -PLUGIN_BUILD_ARGS | Docker build args, a comma separated list
{{% /tab %}} From 7b17a81e09c977d09ebc7b80c5f83294e4c5d0e3 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Wed, 31 Jul 2019 10:00:13 -0700 Subject: [PATCH 2/2] Change above to below --- content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md b/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md index b74ba067390..edf934e3ab4 100644 --- a/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md +++ b/content/rancher/v2.x/en/k8s-in-rancher/pipelines/_index.md @@ -337,7 +337,7 @@ The option to publish an image to an insecure registry is not exposed in the UI, {{% tab "By YAML" %}} -You can use specific arguments for Docker daemon and the build. They are not exposed in the UI, but they are available in pipeline YAML format, as indicated in the example above. Available environment variables include: +You can use specific arguments for Docker daemon and the build. They are not exposed in the UI, but they are available in pipeline YAML format, as indicated in the example below. Available environment variables include: Variable Name | Description ------------------------|------------------------------------------------------------