Skip to content

Commit

Permalink
Merge pull request #1931 from flant/docs
Browse files Browse the repository at this point in the history
[docs] Tiny improvements
  • Loading branch information
distorhead committed Nov 22, 2019
2 parents a22f55f + f2b8e34 commit 8522c2d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
34 changes: 27 additions & 7 deletions docs/pages/configuration/introduction.md
Expand Up @@ -88,16 +88,9 @@ Config section with the key `artifact: IMAGE_NAME` is the artifact config sectio

### Minimal config example

Currently Werf requires to define meta config section and at least one image config section. Image config sections will be fully optional soon.

Example of minimal werf config:

```yaml
project: my-project
configVersion: 1
---
image: ~
from: alpine:latest
```

## Organizing configuration
Expand Down Expand Up @@ -380,6 +373,12 @@ Go templates are available within YAML configuration. The following functions ar

* `.Files.Get` function for getting project file content:<a id="files-get" href="#files-get" class="anchorjs-link " aria-label="Anchor link for: .Files.Get" data-anchorjs-icon=""></a>

<div class="tabs">
<a href="javascript:void(0)" class="tabs__btn active" onclick="openTab(event, 'tabs__btn', 'tabs__content', 'ansible')">Ansible</a>
<a href="javascript:void(0)" class="tabs__btn" onclick="openTab(event, 'tabs__btn', 'tabs__content', 'shell')">Shell</a>
</div>

<div id="ansible" class="tabs__content active" markdown="1">
{% raw %}
```yaml
project: my-project
Expand All @@ -397,3 +396,24 @@ Go templates are available within YAML configuration. The following functions ar
dest: /etc/nginx/nginx.conf
```
{% endraw %}
</div>

<div id="shell" class="tabs__content" markdown="1">
{% raw %}
```yaml
project: my-project
configVersion: 1
---

image: app
from: alpine
shell:
setup:
- |
head -c -1 <<EOF | tee file > /etc/nginx/nginx.conf
{{ .Files.Get ".werf/nginx.conf" | indent 4 }}
EOF
```
{% endraw %}
</div>

Expand Up @@ -312,7 +312,7 @@ There are following service values:
* Git branch name or git tag name used: `.Values.global.werf.ci.is_branch`, `.Values.global.werf.ci.branch`, `.Values.global.werf.ci.is_tag`, `.Values.global.werf.ci.tag`.
* `.Values.global.ci.ref` is set to either git branch name or git tag name.
* Full docker images names and ids for each image from `werf.yaml` config: `.Values.global.werf.image.IMAGE_NAME.docker_image` and `.Values.global.werf.image.IMAGE_NAME.docker_image_id`.
* `.Values.global.werf.is_nameless_image` indicates whether there is a single image defined in the `werf.yaml` config.
* `.Values.global.werf.is_nameless_image` indicates whether there is the nameless image defined in the `werf.yaml` config.
* Project name from `werf.yaml`: `.Values.global.werf.name`.
* Docker tag being used during deploy for images from `werf.yaml` (accordingly to the selected tagging strategy): `.Values.global.werf.docker_tag`.
* Images repo being used during deploy: `.Values.global.werf.repo`.
Expand Down

0 comments on commit 8522c2d

Please sign in to comment.