114.4. プロデューサーの例

以下は、ファイル test.java をローカルリポジトリーに追加し、マスターブランチで特定のメッセージを使用してコミットし、リモートリポジトリーにプッシュするプロデューサーのルート例です。

from("direct:start")
        .setHeader(GitConstants.GIT_FILE_NAME, constant("test.java"))
        .to("git:///tmp/testRepo?operation=add")
        .setHeader(GitConstants.GIT_COMMIT_MESSAGE, constant("first commit"))
        .to("git:///tmp/testRepo?operation=commit")
        .to("git:///tmp/testRepo?operation=push&remotePath=https://foo.com/test/test.git&username=xxx&password=xxx")
        .to("git:///tmp/testRepo?operation=createTag&tagName=myTag")
        .to("git:///tmp/testRepo?operation=pushTag&tagName=myTag&remoteName=origin")