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
64db2f21
Commit
64db2f21
authored
Apr 13, 2015
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate edxapp config files for testing.
parent
913df64a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
.travis.yml
+9
-0
tests/validate_templates.sh
+37
-0
No files found.
.travis.yml
View file @
64db2f21
...
...
@@ -38,6 +38,7 @@ script:
popd
-
|
set -e
ROOT_DIR=$PWD
cd playbooks/edx-east
ROLE_DIRS=$(/bin/ls -d roles/*)
cat <<EOF >travis-test.yml
...
...
@@ -51,3 +52,11 @@ script:
ansible-playbook -i localhost, --syntax-check travis-test.yml
output_dir="$PWD/test_output/env-dep"
mkdir -p $output_dir
ansible-playbook -i localhost, -c local --tags edxapp_cfg edxapp.yml -e edxapp_user=`whoami` -e edxapp_app_dir=$output_dir -e edxapp_code_dir=$output_dir -e EDXAPP_CFG_DIR=$output_dir
root_dir=$output_dir
environment_deployments="."
source $ROOT_DIR/tests/validate_templates.sh
tests/validate_templates.sh
0 → 100755
View file @
64db2f21
#!/usr/bin/env bash
# This file should be sourced
# The 'root_dir' and 'environment_deployments' variables
# should be set when we source this.
for
e_d
in
$environment_deployments
do
GREP_DIR
=
"
$root_dir
/
${
e_d
}
"
if
!
egrep
-q
-r
--include
*
.json
'{{'
"
${
GREP_DIR
}
"
;
then
echo
"No un-expanded vars in
${
e_d
}
"
else
echo
"Found un-expanded vars in
${
e_d
}
"
echo
`
egrep
-r
--include
*
.json
'{{'
"
${
GREP_DIR
}
"
`
FAIL
=
1
fi
if
!
egrep
-qi
-r
--include
*
.json
\'
"False"
\'
"
${
GREP_DIR
}
"
;
then
echo
"No quoted False."
else
echo
"Found a quoted boolean in
${
e_d
}
"
echo
`
egrep
-qi
-r
--include
*
.json
"False"
"
${
GREP_DIR
}
"
`
FAIL
=
1
fi
if
!
egrep
-qi
-r
--include
*
.json
'\"True\"'
"
${
GREP_DIR
}
"
;
then
echo
"No quoted False."
else
echo
"Found a quoted boolean in
${
e_d
}
"
echo
`
egrep
-qi
-r
--include
*
.json
'\"True\"'
"
${
GREP_DIR
}
"
`
FAIL
=
1
fi
done
if
[
"
$FAIL
"
-eq
1
]
;
then
echo
"Failing..."
exit
1
fi
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