Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
File Transfer Service
fts-rest
Commits
a5f8a215
Commit
a5f8a215
authored
Jan 19, 2017
by
Andrea Manzi
Browse files
add docker packaging and gitlab-ci build
parent
c3989edb
Pipeline
#66899
passed with stage
in 4 minutes and 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a5f8a215
image
:
docker:latest
stages
:
-
build
-
tag
variables
:
CONTAINER_TEST_IMAGE
:
gitlab-registry.cern.ch/fts/fts-rest:latest
CONTAINER_RELEASE_IMAGE
:
gitlab-registry.cern.ch/fts/fts-rest:$CI_BUILD_REF_NAME
before_script
:
-
docker info
-
docker login -p "${REGISTRY_PASSWD}" -u "${REGISTRY_USER}" gitlab-registry.cern.ch
after_script
:
-
docker logout gitlab-registry.cern.ch
job1
:
build
:
stage
:
build
only
:
-
develop
script
:
-
docker build -
t gitlab-registry.cern.ch/fts/fts-rest
packaging/docker
-
docker push
gitlab-registry.cern.ch/fts/fts-rest
-
docker build -
-pull -t $CONTAINER_TEST_IMAGE
packaging/docker
-
docker push
$CONTAINER_TEST_IMAGE
tags
:
-
docker
-
docker
tag
:
stage
:
tag
only
:
-
tags
script
:
-
docker build -t $CONTAINER_RELEASE_IMAGE --build-arg ftsrepo=http://fts-repo.web.cern.ch/fts-repo/fts3-rc-el7.repo --build-arg dmcrepo=http://dmc-repo.web.cern.ch/dmc-repo/dmc-rc-el7.repo packaging/docker
-
docker push $CONTAINER_RELEASE_IMAGE
tags
:
-
docker
packaging/docker/Dockerfile
View file @
a5f8a215
...
...
@@ -9,22 +9,23 @@ RUN /usr/bin/rpm --import /tmp/RPM-GPG-KEY-cern \
&&
rm
/tmp/RPM-GPG-KEY-cern
\
&&
rm
-rf
/var/cache/yum
#
A
dd EPEL repos
ADD
http://mirror.switch.ch/ftp/mirror/epel/
7/x86_64/e/
epel-release-
7-8
.noarch.rpm /tmp/epel-release-7
-8
.noarch.rpm
RUN
yum localinstall /tmp/epel-release-7
-8
.noarch.rpm
-y
\
#
a
dd EPEL repos
ADD
http://mirror.switch.ch/ftp/mirror/epel/epel-release-
latest-7
.noarch.rpm /tmp/epel-release-7.noarch.rpm
RUN
yum localinstall /tmp/epel-release-7.noarch.rpm
-y
\
&&
/usr/bin/yum
--enablerepo
=
*
-testing
clean all
\
&&
rm
/tmp/epel-release-7
-8
.noarch.rpm
\
&&
rm
/tmp/epel-release-7.noarch.rpm
\
&&
rm
-rf
/var/cache/yum
# add FTS repo
ADD
http://grid-deployment.web.cern.ch/grid-deployment/dms/fts3/repos/fts3-continuous-el7.repo /etc/yum.repos.d/fts.repo
ARG
ftsrepo=http://fts-repo.web.cern.ch/fts-repo/fts3-continuous-el7.repo
ADD
$ftsrepo /etc/yum.repos.d/fts.repo
#add DMC repo
ARG
dmcrepo=http://dmc-repo.web.cern.ch/dmc-repo/dmc-ci-el7.repo
ADD
$dmcrepo /etc/yum.repos.d/dmc.repo
ADD
http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/repos/dmc-ci-el7.repo /etc/yum.repos.d/dmc.repo
RUN
/usr/bin/yum clean all
#install fts packages
RUN
/usr/bin/yum
install
-y
fts-rest-selinux fts-rest httpd MySQL-python
RUN
/usr/bin/yum
install
-y
voms-config-wlcg voms-config-vo-dteam
...
...
@@ -36,5 +37,3 @@ RUN usermod -a -G fts3 apache
#expose ports
EXPOSE
8446
CMD
/bin/bash
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