Commit 9c863ffc authored by Maurice A Brookhart's avatar Maurice A Brookhart
Browse files

Add .gitlab-ci.yml

parent dfd74158
Pipeline #2457 failed with stage
in 26 seconds
# This gitlab-ci configuration can be used in any repository that
# contains the source for an R package. It will build the package
# as an artifact of the build, and for executions on the master
# branch, it will push the package to http://cran.novisci.com, which
# is assumed to be mounted at /mnt/cran.novisci.com
#
# There is only one stage -- a packaging stage. Each job can be independently
# executed on an available runner.
stages:
- package
# Use R build docker image
image: registry.novisci.com/infrastructure/r-build-dock:master
before_script:
# Convert the incoming branch/tag reference to a DNS compliant name
# (eg. "ABCD-1234/branch.topic" becomes "ABCD-1234-branch_topic")
- export SAFE_REF_NAME=$(echo $CI_COMMIT_REF_NAME | sed -e 's:/:-:g' -e 's:\.:_:g')
# Store an artifact in gitlab that is the result of R CMD build
# Keep it for a week by default. Any longer requires manual intervention
# through the UI or API.
package:
stage: package
script:
- rm -rf .git
- R CMD build .
artifacts:
name: "${CI_PROJECT_NAME}-${SAFE_REF_NAME}"
paths:
- ./${CI_PROJECT_NAME}_*
expire_in: 1 week
# For master builds, push the package to http://cran.novisci.com
# Note: The script below does not download the dependencies of the
# package to the repository.
#
minicran:
stage: package
only:
- master
script:
- rm atcg*.tar.gz || true
- Rscript -e "library(miniCRAN); addLocalPackage('${CI_PROJECT_NAME}', pkgPath='..', path='/mnt/cran.novisci.com', type='source', build=TRUE)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment