build: added Travis ci for Linux builds (#857)
This commit is contained in:
-113
@@ -1,113 +0,0 @@
|
||||
variables:
|
||||
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
|
||||
IMAGE_64: coatisoftware/centos7_64_qt_llvm:qt5126-llvm900
|
||||
IMAGE_32: coatisoftware/centos6_32_qt_llvm:qt5101-llvm800
|
||||
|
||||
## Templates ##
|
||||
|
||||
.build_template: &build_def
|
||||
stage: build
|
||||
before_script:
|
||||
# CCache Config/jobs
|
||||
- mkdir -p ccache
|
||||
- export CCACHE_BASEDIR=${PWD}
|
||||
- export CCACHE_DIR=${PWD}/ccache
|
||||
script:
|
||||
- ./script/buildonly.sh all
|
||||
- ./script/buildonly.sh package
|
||||
# - ./script/build.sh release test
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- Sourcetrail*.tar.gz
|
||||
expire_in: 3 days
|
||||
|
||||
.deploy_template: &deploy_def
|
||||
image: alpine
|
||||
stage: deploy
|
||||
before_script:
|
||||
- apk add --no-cache lftp git
|
||||
script:
|
||||
- VERS=$(git describe --long | sed 's/-/./' | sed 's/-.*//')
|
||||
- TARGET_DIR=releases-$CI_ENVIRONMENT_NAME/$TYPE/$VERS
|
||||
- echo $TARGET_DIR/$CI_ENVIRONMENT_NAME/$TYPE/
|
||||
- lftp -u $FTP_USER,$FTP_PW -p $FTP_PORT $FTP_ADDR -e "mkdir $TARGET_DIR; mput -O $TARGET_DIR Sourcetrail*; bye"
|
||||
only:
|
||||
- master
|
||||
- tags
|
||||
- /^release.*$/
|
||||
|
||||
|
||||
## Build Stage ##
|
||||
|
||||
build:Linux64:
|
||||
image: $IMAGE_64
|
||||
when: manual
|
||||
cache:
|
||||
key: cache_linux_64
|
||||
paths:
|
||||
- ccache/
|
||||
- java_indexer/.m2/repository
|
||||
<<: *build_def
|
||||
|
||||
build:Linux32:
|
||||
image: $IMAGE_32
|
||||
when: manual
|
||||
cache:
|
||||
key: cache_linux_32
|
||||
paths:
|
||||
- ccache/
|
||||
- java_indexer/.m2/repository
|
||||
<<: *build_def
|
||||
|
||||
## Deploy ##
|
||||
|
||||
deploy:Linux_staging_beta:
|
||||
when: manual
|
||||
environment:
|
||||
name: staging
|
||||
variables:
|
||||
TYPE: beta
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_staging_full:
|
||||
when: manual
|
||||
environment:
|
||||
name: staging
|
||||
variables:
|
||||
TYPE: full
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_production_beta:
|
||||
when: manual
|
||||
environment:
|
||||
name: production
|
||||
variables:
|
||||
TYPE: beta
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_production_full:
|
||||
when: manual
|
||||
environment:
|
||||
name: production
|
||||
variables:
|
||||
TYPE: full
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_tag_staging:
|
||||
environment:
|
||||
name: staging
|
||||
variables:
|
||||
TYPE: beta
|
||||
<<: *deploy_def
|
||||
only:
|
||||
- tags
|
||||
|
||||
## could be interesting for daily/weekly/monthly builds
|
||||
# https://docs.gitlab.com/ce/user/project/pipelines/schedules.html
|
||||
#
|
||||
#job:on-schedule:
|
||||
#only:
|
||||
# - schedules
|
||||
#
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
language: bash
|
||||
|
||||
services: docker
|
||||
|
||||
install:
|
||||
- chmod 777 deployment/dockerfiles/linux/travis_ci/entrypoint.sh
|
||||
- docker build -t coatisoftware/local deployment/dockerfiles/linux/travis_ci
|
||||
|
||||
script:
|
||||
- COMMIT_HASH=$(git rev-parse HEAD)
|
||||
- docker run --name builder coatisoftware/local ${COMMIT_HASH}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
[Sourcetrail](https://www.sourcetrail.com/) is a free and open-source cross-platform source explorer that helps you get productive on unfamiliar source code.
|
||||
|
||||
[](https://ci.appveyor.com/project/mlangkabel/sourcetrail/branch/master)
|
||||
Windows: [](https://ci.appveyor.com/project/mlangkabel/sourcetrail/branch/master)
|
||||
|
||||
Linux: [](https://travis-ci.org/CoatiSoftware/Sourcetrail)
|
||||
|
||||
|
||||
__Links__
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM coatisoftware/centos7_64_qt_llvm:qt5126-llvm900
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
echo "building commit: $1"
|
||||
|
||||
git clone https://github.com/CoatiSoftware/Sourcetrail.git
|
||||
|
||||
cd Sourcetrail
|
||||
|
||||
git checkout $1
|
||||
|
||||
./script/buildonly.sh all
|
||||
|
||||
./script/buildonly.sh package
|
||||
|
||||
./script/build.sh release test
|
||||
Reference in New Issue
Block a user