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
9212dea7
Commit
9212dea7
authored
Dec 22, 2015
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let 'make docker.test.shard' take shard variables for dynamic parallelization across travis workers
parent
ff589689
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
.travis.yml
+4
-2
docker.mk
+12
-6
No files found.
.travis.yml
View file @
9212dea7
...
...
@@ -22,11 +22,13 @@ install:
-
"
pip
install
--allow-all-external
demjson"
env
:
-
MAKE_TARGET=docker.test
-
MAKE_TARGET=docker.test.shard SHARD=0 SHARDS=3
-
MAKE_TARGET=docker.test.shard SHARD=1 SHARDS=3
-
MAKE_TARGET=docker.test.shard SHARD=2 SHARDS=3
-
MAKE_TARGET=test.syntax
-
MAKE_TARGET=test.edx_east_roles
script
:
-
docker --version
-
make --version
-
make --keep-going $MAKE_TARGET
-
make --keep-going $MAKE_TARGET
SHARD=$SHARD SHARDS=$SHARDS
docker.mk
View file @
9212dea7
.PHONY
:
docker.build docker.test docker.pkg
SHARD
=
0
SHARDS
=
1
dockerfiles
:=
$(
shell
ls
docker/build/
*
/Dockerfile
)
images
:=
$
(
patsubst docker/build/%/Dockerfile,%,
$(dockerfiles)
)
docker_build
=
docker.build.
docker_test
=
docker.test.
...
...
@@ -22,6 +26,12 @@ pkg: docker.pkg
clean
:
rm
-rf
.build
docker.test.shard
:
$(foreach image
,
$(shell echo $(images) | tr ' ' '
\n
' | sed -n '$(SHARD)~$(SHARDS)p')
,
$(docker_test)$(image))
docker.build
:
$(foreach image
,
$(images)
,
$(docker_build)$(image))
docker.test
:
$(foreach image
,
$(images)
,
$(docker_test)$(image))
docker.pkg
:
$(foreach image
,
$(images)
,
$(docker_pkg)$(image))
docker.push
:
$(foreach image
,
$(images)
,
$(docker_push)$(image))
$(docker_pull)%
:
docker pull
$*
...
...
@@ -44,11 +54,7 @@ $(docker_push)%: $(docker_pkg)%
@
mkdir
-p
.build/
$*
$
(
eval
FROM
=
$(
shell
grep
"FROM"
$<
| sed
--regexp-extended
"s/FROM //"
| sed
--regexp-extended
"s/:/@/g"
)
)
$
(
eval
EDXOPS_FROM
=
$(
shell
echo
"
$(FROM)
"
| sed
--regexp-extended
"s#edxops/([^@]+
)
(@.*
)
?#
\1
#"
)
)
@
echo
"docker.build:
$(docker_build)$*
"
>
$@
@
echo
"docker.test:
$(docker_test)$*
"
>>
$@
@
echo
"docker.pkg:
$(docker_pkg)$*
"
>>
$@
@
echo
"docker.push:
$(docker_push)$*
"
>>
$@
@
echo
"
$(docker_build)$*
:
$(docker_pull)$(FROM)
"
>>
$@
@
echo
"
$(docker_build)$*
:
$(docker_pull)$(FROM)
"
>
$@
@
if
[
"
$(EDXOPS_FROM)
"
!=
"
$(FROM)
"
]
;
then
\
echo
"
$(docker_test)$*
:
$(docker_test)
$
(EDXOPS_FROM:@%=)"
>>
$@
;
\
echo
"
$(docker_pkg)$*
:
$(docker_pkg)
$
(EDXOPS_FROM:@%=)"
>>
$@
;
\
...
...
@@ -65,4 +71,4 @@ $(docker_push)%: $(docker_pkg)%
@
mkdir
-p
.build/
$*
@
sed
--regexp-extended
"s#FROM edxops/([^:]+)(:
\S
*)?#FROM
\1
:test#"
$<
>
$@
include
$(
patsubst
docker/build/%/Dockerfile,.build/%/Dockerfile.d,$(dockerfiles)
)
include
$(
foreach
image,$(images),.build/$(image)/Dockerfile.d
)
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