Updated to reflect scripts that work with bitbucket
diff --git a/private-repository-create-update.yml b/private-bitbucket-repository-create-update.yml similarity index 84% rename from private-repository-create-update.yml rename to private-bitbucket-repository-create-update.yml index 383994e..efbd846 100644 --- a/private-repository-create-update.yml +++ b/private-bitbucket-repository-create-update.yml
@@ -7,7 +7,7 @@ - repository-custom-properties.yml - private-repository-user-list.yml tasks: - - name: Create repositories if necessary + - name: Create Bitbucket repositories if necessary uri: url: "{{ repository_secure_endpoint_https }}" method: POST @@ -22,7 +22,7 @@ forkable: True with_items: "{{ repo_names }}" - - name: Add permissions to repos + - name: Add permissions to Bitbucket repositories uri: url: "{{ repository_secure_endpoint_https }}/permissions/users?name={{ item }}&permission=PROJECT_ADMIN" method: PUT @@ -32,21 +32,21 @@ status_code: 204,409 with_items: "{{ repo_users }}" - - name: Add Onestash as remote repo + - name: Add second git host as remote repo ignore_errors: true shell: "git remote add target {{ repository_secure_endpoint_ssh }}/{{ item.repo_name }}.git" args: chdir: "{{ item.workspace }}/{{ item.repo_name }}" with_items: "{{ repo_names }}" - - name: Pull from Onestash if the repo is already there + - name: Pull from second git host if the repo is already there ignore_errors: yes shell: "git pull target master" args: chdir: "{{ item.workspace }}/{{ item.repo_name }}" with_items: "{{ repo_names }}" - - name: Commit updated repos to onestash + - name: Commit updated repos to second git host shell: "git checkout master && git push -u target master" args: chdir: "{{ item.workspace }}/{{ item.repo_name }}"
diff --git a/private-repository-remove.yml b/private-bitbucket-repository-remove.yml similarity index 100% rename from private-repository-remove.yml rename to private-bitbucket-repository-remove.yml