Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Mar 24, 2017
1 parent bbf4c22 commit 2a2ae3a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
29 changes: 1 addition & 28 deletions docs/configuration/build-step/install-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,6 @@ Under 'Build Environment' section:

### Use the installed CLI in build

You can use it in two ways:

1. Add a build step such as 'Execute shell' and invoke Zanata CLI in it (see [below example](/configuration/build-step/install-cli/#example-execute-shell-step-using-zanata-cli))
2. Choose another build step [Zanata Sync via CLI](/configuration/zanata-sync-via-cli/)

##### Example: Execute shell step using Zanata CLI
Assuming you follow the [above configuration](/images/job_installs_cli.png) and
have chosen 'zanata_cli_4_0_0' and checked convert to uppercase,
the shell script below will do zanata push and pull and then git
commit:
```bash
Z=$ZANATA_CLI_4_0_0_HOME/bin/zanata-cli

$Z -B push --file-types "PLAIN_TEXT[adoc]" --username $Z_U --key $Z_P

$Z -B pull --username $Z_U --key $Z_P

# only needed if .zanata-cache/ is not in your .gitignore
rm -rf .zanata-cache/

git add .
# only needed if you haven't configure this globally in your Jenkins
git config user.name "Jenkins"
git config user.email "[email protected]"

git commit -m "$BUILD_URL did this"

```
Choose another build step [Zanata Sync via CLI](/configuration/zanata-sync-via-cli/)

__NOTE__: You still need to do normal git push in a [post build step](/configuration/post-build/)
3 changes: 1 addition & 2 deletions docs/configuration/build-step/zanata-sync-via-cli.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
### Alternative build step
####(experimental and subject to change without notice)
### Alternative build step (still in development)

From Yu Shao [email protected]

Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ push resources to Zanata.

Then in the 'Build' section, you will have two options to push source to and/or pull translation from Zanata server.

1. [Use the plugin as a build step](/configuration/build-step/zanata-sync)
2. [Install Zanata CLI on Jenkins node and use scripting to invoke it](/configuration/build-step/install-cli)
1. [Use 'Zanata Sync' build step](/configuration/build-step/zanata-sync)
2. [Install Zanata CLI on Jenkins node and use 'Zanata Sync via CLI' build step](/configuration/build-step/install-cli)

Option 1 has the advantage of being installation free and simple to use. It will work on all type of jenkins slave nodes.
It will commit translation after pull automatically if you use Git as SCM.
Expand Down
1 change: 0 additions & 1 deletion docs/pipeline/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ _Hint_: Use Pipeline Syntax and choose 'step: General Build Step', then select t
##### Complete sample pipeline scripts

- [Use Zanata Sync build step](/pipeline/zanata-sync-pipeline-example/)
- [Install and use Zanata CLI](/pipeline/install-use-cli-pipeline-example/)
- [Use Zanata Sync via CLI build step](/pipeline/zanata-sync-via-cli-pipeline-example/)
3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ pages:
- Configuration:
- General: 'configuration/index.md'
- Zanata Sync Build Step: 'configuration/build-step/zanata-sync.md'
- Install and use Zanata CLI: 'configuration/build-step/install-cli.md'
- Install Zanata CLI: 'configuration/build-step/install-cli.md'
- Zanata Sync via CLI Build Step: 'configuration/build-step/zanata-sync-via-cli.md'
- Post Build SCM Sync: 'configuration/post-build.md'
- Pipeline build:
- General: 'pipeline/index.md'
- Example using Zanata Sync Build Step: 'pipeline/zanata-sync-pipeline-example.md'
- Example using Zanata CLI: 'pipeline/install-use-cli-pipeline-example.md'
- Example using Zanata Sync via CLI Build Step: 'pipeline/zanata-sync-via-cli-pipeline-example.md'

0 comments on commit 2a2ae3a

Please sign in to comment.