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
da43e464
Unverified
Commit
da43e464
authored
Jul 12, 2018
by
Ned Batchelder
Committed by
GitHub
Jul 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4677 from edx/nedbat/git-status
Check that git working trees are clean
parents
cacd6e8b
ec307991
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
CHANGELOG.md
+3
-0
playbooks/roles/git_clone/tasks/main.yml
+14
-0
No files found.
CHANGELOG.md
View file @
da43e464
-
git_clone:
-
The working tree is explicitly checked for modified files, to prevent mysterious failures.
-
Installation
-
OPENEDX_RELEASE is now required, to prevent accidental installation of master.
-
sandbox.sh has been renamed native.sh to better indicate what it does.
...
...
playbooks/roles/git_clone/tasks/main.yml
View file @
da43e464
...
...
@@ -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