Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ascii-alignment-pileup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
zavolan_group
tools
ascii-alignment-pileup
Commits
d842bbfe
Commit
d842bbfe
authored
2 years ago
by
Alex Kanitz
Browse files
Options
Downloads
Patches
Plain Diff
ci: add Conda tests and refactor
parent
edff11c7
No related branches found
No related tags found
1 merge request
!7
ci: add Conda tests and refactor
Pipeline
#14481
passed
2 years ago
Stage: build
Stage: test
Stage: publish
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+49
-16
49 additions, 16 deletions
.gitlab-ci.yml
environment.yml
+1
-0
1 addition, 0 deletions
environment.yml
with
50 additions
and
16 deletions
.gitlab-ci.yml
+
49
−
16
View file @
d842bbfe
...
...
@@ -6,27 +6,60 @@ workflow:
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "push"
test
:
rules
:
-
if
:
$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
stages
:
-
build
-
test
-
publish
build_conda
:
stage
:
build
script
:
-
mamba env create --force -f environment.yml
-
echo $CONDA_DEFAULT_ENV
build_docker
:
stage
:
build
before_script
:
-
export IMAGE="${DOCKER_ORG}/${DOCKER_REPO}"
-
export BUILD_TAG="build"
-
echo "IMAGE=$IMAGE" >> build.env
-
echo "BUILD_TAG=$BUILD_TAG" >> build.env
script
:
-
docker build -t ${IMAGE}:${BUILD_TAG} .
artifacts
:
reports
:
dotenv
:
build.env
test_conda
:
stage
:
test
needs
:
job
:
build_conda
before_script
:
-
conda activate ascii-alignment-pileup
script
:
-
tests/test.sh
test_docker
:
stage
:
test
needs
:
-
job
:
build_docker
artifacts
:
true
script
:
-
export IMAGE="${DOCKER_ORG}/${DOCKER_REPO}:latest"
-
docker build -t $IMAGE .
-
docker run --rm $IMAGE tests/test.sh
-
docker run --rm ${IMAGE}:${BUILD_TAG} tests/test.sh
test_and_publish
:
publish_docker
:
stage
:
publish
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script
:
needs
:
-
job
:
build_docker
artifacts
:
true
-
job
:
test_docker
before_script
:
-
export VERSION=$(grep 'version <-' ascii_alignment_pileup.R | cut -f2 -d'"')
-
export IMAGE="${DOCKER_ORG}/${DOCKER_REPO}"
-
|
docker build \
-t ${IMAGE}:${VERSION} \
--build-arg version=$VERSION \
.
-
docker run --rm ${IMAGE}:${VERSION} tests/test.sh
script
:
-
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USER}" --password-stdin
-
docker tag ${IMAGE}:${VERSION} ${IMAGE}:latest
-
docker tag ${IMAGE}:${BUILD_TAG} ${IMAGE}:${VERSION}
-
docker tag ${IMAGE}:${BUILD_TAG} ${IMAGE}:latest
-
docker push ${IMAGE}:${VERSION}
-
docker push ${IMAGE}:latest
This diff is collapsed.
Click to expand it.
environment.yml
+
1
−
0
View file @
d842bbfe
name
:
ascii-alignment-pileup
channels
:
-
bioconda
-
conda-forge
dependencies
:
-
r-optparse=1.7.1
-
bioconductor-rtracklayer=1.54.0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment