test ci
This commit is contained in:
parent
0778f64416
commit
02a64f34ef
|
@ -22,9 +22,6 @@ test:
|
||||||
- docker-compose -f docker-compose.ci.service.yml -p auth-service --env-file ci/.env.ci up -d
|
- docker-compose -f docker-compose.ci.service.yml -p auth-service --env-file ci/.env.ci up -d
|
||||||
- docker exec -t v3-auth-api sh -c "npm run test:integration:ci"
|
- docker exec -t v3-auth-api sh -c "npm run test:integration:ci"
|
||||||
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
|
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
|
||||||
rules:
|
|
||||||
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
||||||
when: always
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# BUILD STAGE #
|
# BUILD STAGE #
|
||||||
|
@ -58,22 +55,24 @@ push latest:
|
||||||
stage: push
|
stage: push
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
before_script:
|
|
||||||
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
before_script:
|
||||||
|
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
|
- export VERSION=$(docker run --rm -v "$PWD":/usr/src/app:ro -w /usr/src/app node:slim node -p "require('./package.json').version")
|
||||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$VERSION $CI_REGISTRY_IMAGE:latest
|
||||||
- docker push $CI_REGISTRY_IMAGE:latest
|
- docker push $CI_REGISTRY_IMAGE:latest
|
||||||
|
# push tag:
|
||||||
push tag:
|
# stage: push
|
||||||
stage: push
|
# variables:
|
||||||
variables:
|
# GIT_STRATEGY: none
|
||||||
GIT_STRATEGY: none
|
# only:
|
||||||
only:
|
# - tags
|
||||||
- tags
|
# before_script:
|
||||||
script:
|
# - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
# script:
|
||||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
# - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
# - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||||
|
# - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||||
|
|
Loading…
Reference in New Issue