Skip to content
Snippets Groups Projects
Commit fba17a7b authored by Todor Kondić's avatar Todor Kondić
Browse files

Update .gitlab-ci.yml

parent 3eeca83c
No related branches found
No related tags found
No related merge requests found
Pipeline #69179 passed
# image: kontrapunkt/eci
# test:
# stage: test
# variables:
# METFRAG_JAR: "/usr/local/bin/MetFragCommandLine-2.5.0.jar"
# script:
# - R CMD build . --no-build-vignettes --no-manual
# - PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
# - R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual
# - R -e 'devtools::test()'
# build:
# stage: build
# only:
# - tags
# script:
# - echo "Hello $CI_REGISTRY_IMAGE:`echo $CI_COMMIT_TAG|sed 's/^v\(.*\)/\1/'`"
image: docker:23.0.1 image: docker:23.0.1
services: services:
- docker:23.0.1-dind - docker:23.0.1-dind
...@@ -25,16 +5,12 @@ services: ...@@ -25,16 +5,12 @@ services:
stages: stages:
- build - build
- test - test
# - release - release
# - deploy
variables: variables:
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
#DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: "/certs"
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
#DOCKER_TLS_CERTDIR: ""
build: build:
tags: tags:
...@@ -49,9 +25,6 @@ build: ...@@ -49,9 +25,6 @@ build:
- docker build --pull -t $CONTAINER_TEST_IMAGE . - docker build --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE - docker push $CONTAINER_TEST_IMAGE
# - echo $CI_REGISTRY_IMAGE
# - echo $CI_COMMIT_REF_SLUG
# - echo $CI_COMMIT_TAG
test: test:
tags: tags:
...@@ -61,37 +34,15 @@ test: ...@@ -61,37 +34,15 @@ test:
script: script:
- docker pull $CONTAINER_TEST_IMAGE - docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE test - docker run $CONTAINER_TEST_IMAGE test
# build:
# stage: build
# script:
# test1:
# stage: test
# script:
# - docker pull $CONTAINER_TEST_IMAGE
# - docker run $CONTAINER_TEST_IMAGE /script/to/run/tests
# test2:
# stage: test
# script:
# - docker pull $CONTAINER_TEST_IMAGE
# - docker run $CONTAINER_TEST_IMAGE /script/to/run/another/test
# release-image: release-image:
# stage: release tags:
# script: - docker
# - docker pull $CONTAINER_TEST_IMAGE - $RUNNER_TAG
# - docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE stage: release
# - docker push $CONTAINER_RELEASE_IMAGE script:
# only: - docker pull $CONTAINER_TEST_IMAGE
# - main - docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
# deploy: # only:
# stage: deploy # - master
# script:
# - ./deploy.sh
# only:
# - main
# environment: production
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment