Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
senpy
senpy
Commits
20357d2a
Commit
20357d2a
authored
Feb 13, 2017
by
J. Fernando Sánchez
Browse files
Added gitlab CI
parent
e9d7980e
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
20357d2a
image
:
docker:latest
services
:
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables
:
DOCKER_DRIVER
:
overlay
stages
:
-
test
-
release
-
deploy
.test
:
&test_definition
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/pip-cache"
cache
:
paths
:
-
.venv/
-
pip-cache/
key
:
"
$CI_PROJECT_NAME"
stage
:
test
script
:
-
pip install virtualenv
-
virtualenv -q .venv
-
source .venv/bin/activate
-
python setup.py test
test-3.5
:
<<
:
*test_definition
image
:
python:3.5
test-3.4
:
<<
:
*test_definition
image
:
python:3.4
test-2.7
:
<<
:
*test_definition
image
:
python:2.7
.image
:
&image_definition
stage
:
release
variables
:
IMAGE_NAME
:
$REGISTRY_IMAGE:$CI_BUILD_TAG
DOCKERFILE
:
Dockerfile
services
:
-
docker:dind
before_script
:
-
docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script
:
-
docker build -f $DOCKERFILE . -t $IMAGE_NAME
-
docker push $IMAGE_NAME
only
:
-
tags
-
triggers
image
:
<<
:
*image_definition
only
:
-
master
image-3.5
:
<<
:
*image_definition
variables
:
IMAGE_NAME
:
$REGISTRY_IMAGE:$CI_BUILD_TAG-python3.5
DOCKERFILE
:
Dockerfile-3.5
image-2.7
:
<<
:
*image_definition
variables
:
IMAGE_NAME
:
$REGISTRY_IMAGE:$CI_BUILD_TAG-python2.7
DOCKERFILE
:
Dockerfile-2.7
\ No newline at end of file
MANIFEST.in
View file @
20357d2a
include requirements.txt
include test-requirements.txt
include README.md
include senpy/context.jsonld
include README.rst
include senpy/VERSION
graft senpy/plugins
graft senpy/schemas
...
...
Makefile
View file @
20357d2a
...
...
@@ -5,6 +5,7 @@ REPO=gsiupm
VERSION
=
$(
shell
cat
$(NAME)
/VERSION
)
TARNAME
=
$(NAME)
-
$(
subst
-,.,
$(VERSION)
)
.tar.gz
IMAGENAME
=
$(REPO)
/
$(NAME)
:
$(VERSION)
TEST_COMMAND
=
gitlab-runner
exec
docker
--cache-dir
=
/tmp/gitlabrunner
--docker-volumes
/tmp/gitlabrunner:/tmp/gitlabrunner
--env
CI_PROJECT_NAME
=
$(NAME)
all
:
build run
...
...
@@ -39,8 +40,8 @@ debug-%:
debug
:
debug-$(PYMAIN)
test-%
:
build-%
docker run
--rm
-w
/usr/src/app/
--entrypoint
=
/usr/local/bin/python
-ti
'
$(IMAGENAME)
-python$*'
setup.py
test
--addopts
"-vvv -s"
;
test-%
:
$(TEST_COMMAND)
test-
$*
dist/$(TARNAME)
:
docker run
--rm
-ti
-v
$$
PWD:/usr/src/app/
-w
/usr/src/app/ python:
$(PYMAIN)
python setup.py sdist
;
...
...
senpy/VERSION
View file @
20357d2a
0.7.
0
0.7.
1-dev1
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