-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from iqoption/build
Build
- Loading branch information
Showing
25 changed files
with
144 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ARG TAG=ubuntu18 | ||
|
||
FROM neogenie/iqlogger_builder:$TAG | ||
|
||
ARG VERSION | ||
ARG TAG | ||
ARG ARCH | ||
ARG UBUNTU | ||
|
||
ARG CI_PIPELINE_ID | ||
ARG CI_COMMIT_REF_NAME | ||
ARG CI_COMMIT_MESSAGE | ||
ARG CI_COMMIT_SHA | ||
ARG CI_USER | ||
|
||
ADD . /iqlogger | ||
WORKDIR iqlogger | ||
|
||
RUN .build/${TAG}.sh | ||
|
||
RUN cp iqlogger .build_deb/${TAG}/usr/local/bin/ | ||
RUN bash .build_deb/create-deb.sh |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
rm .build_deb/${TAG}/var/log/iqlogger/.gitkeep | ||
rm .build_deb/${TAG}/var/lib/iqlogger/.gitkeep | ||
rm .build_deb/${TAG}/usr/local/bin/.gitkeep | ||
cd .build_deb/${TAG} | ||
fpm -s dir -t deb -a ${ARCH} -n iqlogger -v ${VERSION}-${UBUNTU} -m [email protected] \ | ||
-d libtbb2 -d zlib1g \ | ||
--pre-install ../pre-install.sh \ | ||
--after-install ../post-install.sh \ | ||
--vendor [email protected] \ | ||
--config-files etc/iqlogger \ | ||
etc/ usr/ var/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
os: linux | ||
dist: xenial | ||
language: shell | ||
|
||
services: | ||
- docker | ||
|
||
jobs: | ||
include: | ||
- env: | ||
- TAG=ubuntu16 | ||
- ARCH=amd64 | ||
- UBUNTU=xenial | ||
- env: | ||
- TAG=ubuntu18 | ||
- ARCH=amd64 | ||
- UBUNTU=bionic | ||
|
||
script: | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; | ||
- export VERSION=`cat ./version` | ||
- chmod +x .build/ubuntu16.sh | ||
- chmod +x .build/ubuntu18.sh | ||
- docker build -t builder --build-arg VERSION="$VERSION" --build-arg TAG="$TAG" --build-arg ARCH="$ARCH" --build-arg UBUNTU="$UBUNTU" --build-arg CI_PIPELINE_ID="$TRAVIS_BUILD_NUMBER" --build-arg CI_COMMIT_REF_NAME="$TRAVIS_BRANCH" --build-arg CI_COMMIT_SHA="$TRAVIS_COMMIT" --build-arg CI_COMMIT_MESSAGE="$TRAVIS_COMMIT_MESSAGE" --build-arg CI_USER="$USER" -f .build/Dockerfile . | ||
- docker create --name builder builder | ||
- mkdir -p ${TRAVIS_BUILD_DIR}/build | ||
- docker cp builder:/iqlogger/iqlogger ${TRAVIS_BUILD_DIR}/build/ | ||
- docker cp builder:/iqlogger/.build_deb/${TAG}/iqlogger_$VERSION-${UBUNTU}_$ARCH.deb ${TRAVIS_BUILD_DIR}/build/ | ||
- docker rm builder | ||
- ls -alh ${TRAVIS_BUILD_DIR}/build | ||
- cp ${TRAVIS_BUILD_DIR}/build/iqlogger .docker/usr/local/bin/; | ||
- if [[ "$TAG" == "ubuntu18" ]]; then | ||
docker build -t ${DOCKER_REPOSITORY}:$VERSION .docker; | ||
docker push ${DOCKER_REPOSITORY}:$VERSION; | ||
docker tag ${DOCKER_REPOSITORY}:$VERSION ${DOCKER_REPOSITORY}:latest; | ||
docker push ${DOCKER_REPOSITORY}:latest; | ||
fi | ||
|
||
deploy: | ||
provider: releases | ||
api_key: "$GITHUB_TOKEN" | ||
file_glob: true | ||
file: ${TRAVIS_BUILD_DIR}/build/*.deb | ||
skip_cleanup: true | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters