Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
8a0b40ad
Commit
8a0b40ad
authored
Jul 10, 2018
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that git working trees are clean
(cherry picked from commit
ec307991
)
parent
90a27efc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
playbooks/roles/git_clone/tasks/main.yml
+14
-0
No files found.
playbooks/roles/git_clone/tasks/main.yml
View file @
8a0b40ad
...
...
@@ -54,6 +54,20 @@
-
install
-
install:code
-
name
:
Check that working tree is clean
shell
:
test ! -e "{{ item }}" || git -C "{{ item }}" status --porcelain --untracked-files=no
register
:
dirty_files
# Using the map here means that the items will only be the DESTINATION strings,
# rather than the full GIT_REPOS structures, which have data we don't want to log,
# so we don't have to use no_log on this task.
with_items
:
"
{{
GIT_REPOS
|
map(attribute='DESTINATION')
|
list
}}"
-
name
:
Require a clean working tree
fail
:
msg
:
"
There
are
modified
files
in
{{
item.item
}}:
{{
item.stdout
}}"
when
:
item.stdout|length > 0
with_items
:
"
{{
dirty_files.results
}}"
-
name
:
Checkout code over ssh
git
:
repo
:
"
git@{{
item.DOMAIN
}}:{{
item.PATH
}}/{{
item.REPO
}}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment