Files
zuul/doc/source/examples/playbooks/roles/create_project/tasks/main.yaml
David Shrewsbury e6d8b210cc Documentation reorg
Reorganizing docs as recommended in:

https://www.divio.com/blog/documentation/

This is simply a reorganization of the existing documents and changes
no content EXCEPT to correct the location of sphinx doc references.
Expect followup changes to change document names (to reflect the new
structure) and to move content from existing guides (e.g., to move the
pipeline/project/job structure definitions out of the "Project Configuration"
reference guide into their own reference documents for easier locatability).

All documents are now located in either the "overview", "tutorials",
"discussions", or "references" subdirectories to reflect the new structure
presented to the user. Code examples and images are moved to "examples" and
"images" root-level directories.

Developer specific documents are located in the "references/developer"
directory.

Change-Id: I538ffd7409941c53bf42fe64b7acbc146023c1e3
2020-01-14 12:47:23 -05:00

37 lines
1.1 KiB
YAML

- name: Check if {{ project }} project exists
uri:
url: http://gerrit:8080/projects/{{ project }}
status_code: 200, 404
register: project_check
- name: Create {{ project }}
when: project_check.status==404
block:
- name: Create temp dir for {{ project }} creation
shell: mktemp -d
register: project_tmp
- name: Create {{ project }} project in Gerrit
uri:
url: http://gerrit:8080/a/projects/{{ project }}
method: PUT
user: admin
password: secret
status_code: 201
- name: Create initial commit in {{ project }}
shell:
executable: /bin/sh
chdir: "{{ project_tmp.stdout }}"
cmd: |
git init .
git config user.name "Admin"
git config user.email "admin@example.com"
cat >.gitreview <<EOF
[gerrit]
host=localhost
port=29418
project={{ project }}
EOF
git add .gitreview
git commit -m "Initial commit"
git remote add gerrit http://admin:secret@gerrit:8080/{{ project }}
git push -f --set-upstream gerrit +HEAD:master