Skip to content
Snippets Groups Projects
Commit 4158df9e authored by Bartosz Ziemba's avatar Bartosz Ziemba
Browse files

Changed CI to build deb

parent 46f35b63
No related branches found
No related tags found
1 merge request!17Develop
stages:
- check_style
- build
- deploy
build_image:
build_deb:
stage: build
image: docker:18.09.7
image: clarinpl/python:3.6
script:
- apt-get update && apt-get install -y \
libxml++2.6-dev \
libloki-dev \
libboost-all-dev \
libicu-dev \
libffi-dev \
libssl-dev \
libxml2-utils \
cmake \
swig \
pwrutils \
gdebi-core
- mkdir src/build && cd src/build
- cmake .. && cmake --build . && cpack
artifacts:
paths:
- src/build/corpus2*.deb
expire_in: 1h
push_deb:
stage: deploy
image: clarinpl/cpp:16.04
only:
- master
services:
- docker:18.09.7-dind
script:
- APT_USERNAME=aptuser
- docker build . -t corpus2 --build-arg APT_USERNAME --build-arg APT_PASSWORD
- FILE=$(ls build/corpus2*.deb)
- curl --fail -i -X POST -F "file=@./${FILE}" -u "${APT_USERNAME}:${APT_PASSWORD}" https://apt.clarin-pl.eu/
dependencies:
FROM clarinpl/python:3.6
ARG APT_USERNAME
ARG APT_PASSWORD
RUN test -n "$APT_USERNAME"
RUN test -n "$APT_PASSWORD"
RUN apt-get update && apt-get install -y \
libxml++2.6-dev \
libloki-dev \
libboost-all-dev \
libicu-dev \
libffi-dev \
libssl-dev \
libxml2-utils \
cmake \
swig \
pwrutils \
gdebi-core
RUN mkdir -p /home/install
WORKDIR /home/install
COPY ./src ./corpus2
RUN mkdir corpus2/build && \
cd corpus2/build && \
cmake .. && \
cmake --build . && \
cpack
RUN apt-get install -y curl
WORKDIR /home/install/corpus2/build
COPY ./uploaddeb.sh ./
RUN bash uploaddeb.sh $APT_USERNAME $APT_PASSWORD https://apt.clarin-pl.eu
#!/bin/bash
APT_USERNAME=$1
APT_PASSWORD=$2
APT_SERVER=$3
for file in *.deb ; do
curl --fail -i -X POST -F "file=@./${file}" -u "${APT_USERNAME}:${APT_PASSWORD}" $APT_SERVER
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment