Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PR generation for list of avail extensions script #114

Merged
merged 1 commit into from
Mar 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
python: 3.6
- stage: publish
python: 3.6
script: docker run --rm -e TRAVIS_BUILD_ID=$TRAVIS_BUILD_ID -e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG -e TRAVIS_COMMIT=$TRAVIS_COMMIT -e GH_TOKEN=$GH_TOKEN -e DOC_REPO_SLUG='Azure/azure-docs-cli-python' -v $PWD:/repo derekbekoe/az-avail-ext-doc-sync:0.1.1
script: docker run --rm -e TRAVIS_BUILD_ID=$TRAVIS_BUILD_ID -e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG -e TRAVIS_COMMIT=$TRAVIS_COMMIT -e GH_TOKEN=$GH_TOKEN -e DOC_REPO_SLUG='Azure/azure-docs-cli-python' -v $PWD:/repo derekbekoe/az-avail-ext-doc-sync:0.1.2
env: PURPOSE='SyncAvailableExtensionsDoc'
if: repo = Azure/azure-cli-extensions and branch = master and type = push
fast_finish: true
Expand Down
6 changes: 3 additions & 3 deletions scripts/avail-ext-doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Automatically create PR to update the document listing the available CLI extensions.

```bash
docker build . -t derekbekoe/az-avail-ext-doc-sync:0.1.0
docker build . -t derekbekoe/az-avail-ext-doc-sync:0.1.2
```

To run locally:
```bash
docker run --rm -e TRAVIS_BUILD_ID=$TRAVIS_BUILD_ID -e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG -e TRAVIS_COMMIT=$TRAVIS_COMMIT -e GH_TOKEN=$GH_TOKEN -e DOC_REPO_SLUG=$DOC_REPO_SLUG -v $PWD:/repo derekbekoe/az-avail-ext-doc-sync:0.1.1
docker run --rm -e TRAVIS_BUILD_ID=$TRAVIS_BUILD_ID -e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG -e TRAVIS_COMMIT=$TRAVIS_COMMIT -e GH_TOKEN=$GH_TOKEN -e DOC_REPO_SLUG=$DOC_REPO_SLUG -v $PWD:/repo derekbekoe/az-avail-ext-doc-sync:0.1.2
```

For example:
```bash
docker run --rm -e TRAVIS_BUILD_ID=1234 -e TRAVIS_REPO_SLUG='azure/azure-cli-extensions' -e TRAVIS_COMMIT=1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9ol0p -e GH_TOKEN=qwertyuiopasdfghjklzxcvbnm1234567890 -e DOC_REPO_SLUG='azure/azure-docs-cli-python' -v /Repos/azure-cli-extensions:/repo derekbekoe/az-avail-ext-doc-sync:0.1.1
docker run --rm -e TRAVIS_BUILD_ID=1234 -e TRAVIS_REPO_SLUG='azure/azure-cli-extensions' -e TRAVIS_COMMIT=1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9ol0p -e GH_TOKEN=qwertyuiopasdfghjklzxcvbnm1234567890 -e DOC_REPO_SLUG='azure/azure-docs-cli-python' -v /Repos/azure-cli-extensions:/repo derekbekoe/az-avail-ext-doc-sync:0.1.2
```
2 changes: 1 addition & 1 deletion scripts/avail-ext-doc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main():
gh_repo.create_pull(
title='Update CLI extensions available doc',
body=commit_msg,
head='{}:{}'.format(user.login, local_branch.name),
head='{}'.format(local_branch.name),
base='master')

if __name__ == '__main__':
Expand Down