Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
noc
tower
Commits
b63a9359
Commit
b63a9359
authored
Nov 14, 2016
by
Aleksey Shirokih
Browse files
move to packages
parent
654bd899
Pipeline
#161
failed with stages
in 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
b63a9359
variables
:
PROXY
:
http://192.168.60.21:3128
S3_BASE
:
https://s3.getnoc.com
S3_BASE
:
https://s3.
repo.
getnoc.com
/
S3_BUCKET
:
tower
stages
:
...
...
@@ -10,46 +10,23 @@ stages:
build_tgz
:
stage
:
build
image
:
python:2.7.11-alpine
before_script
:
-
export VERSION=$(cat VERSION)
-
if [ -d dist ]; then rm -R dist/*.zip; fi
image
:
registry.getnoc.com/infrastructure/packger:master
script
:
-
apk add --update py-pep8 py-setuptools
-
pep8 --ignore=E265,E266,E501,E402 .
-
python setup.py sdist --format=zip
-
make
artifacts
:
paths
:
-
dist/*
.zip
-
dist/*
tags
:
-
docker
upload
:
stage
:
upload
image
:
registry.getnoc.com/infrastructure/s3helper:
master
image
:
registry.getnoc.com/infrastructure/s3helper:
v2
script
:
-
export VERSION=$(cat VERSION)
-
export FNAME=noc-tower-${VERSION}.zip
-
/tmp/mc -q cp dist/$FNAME cdn/$S3_BUCKET/noc-tower-master.zip
-
if [ -n "${CI_BUILD_TAG}" ]; then /tmp/mc -q cp dist/$FNAME cdn/$S3_BUCKET/noc-tower-${VERSION}.zip; fi
-
if [ -n "${CI_BUILD_TAG}" ]; then /tmp/mc -q cp dist/$FNAME cdn/$S3_BUCKET/noc-tower-latest.zip; fi
-
mc -q config host add cdn https://s3.repo.getnoc.com/ $AWS_ACCESS_KEY $AWS_SECRET_KEY
-
mc cp dist/noc-tower-*.rpm cdn/rpm/7/x86_64
-
mc cp dist/noc-tower-*.deb cdn/apt/in
dependencies
:
-
build_tgz
tags
:
-
docker
build_image
:
stage
:
build_image
before_script
:
-
export VERSION=$(cat VERSION)
-
export CONTAINER_NAME=$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
script
:
-
docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
-
docker build --build-arg="http_proxy=$PROXY" --build-arg="https_proxy=$PROXY" --build-arg=VERSION=${VERSION} -t $CONTAINER_NAME .
-
docker push $CONTAINER_NAME
-
if [ -n "${CI_BUILD_TAG}" ]; then docker tag $CONTAINER_NAME $CI_REGISTRY_IMAGE:${CI_BUILD_TAG}; docker push $CI_REGISTRY_IMAGE:${CI_BUILD_TAG}; fi
-
if [ -n "${CI_BUILD_TAG}" ]; then docker tag $CONTAINER_NAME $CI_REGISTRY_IMAGE:latest; docker push $CI_REGISTRY_IMAGE:latest; fi
dependencies
:
-
build_tgz
tags
:
-
shell
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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