add more things to ci
This commit is contained in:
parent
4067fb4c39
commit
7998135097
1 changed files with 27 additions and 6 deletions
|
|
@ -2,14 +2,35 @@ default:
|
||||||
image: docker:28.5.1-dind
|
image: docker:28.5.1-dind
|
||||||
services:
|
services:
|
||||||
- "docker:28.5.1-dind"
|
- "docker:28.5.1-dind"
|
||||||
|
before-script:
|
||||||
|
- git submodule update --init
|
||||||
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
variables:
|
variables:
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
DOCKER_TLS_CERTDIR: "/certs"
|
||||||
IMAGE_NAME: "ci.virintox.com/spfn/splatie"
|
|
||||||
IMAGE_TAG: "${CI_COMMIT_REF_SLUG}"
|
IMAGE_TAG: "${CI_COMMIT_REF_SLUG}"
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build-image
|
||||||
build:
|
- push
|
||||||
stage: build
|
|
||||||
|
test:
|
||||||
|
image: rust:alpine3.22
|
||||||
script:
|
script:
|
||||||
- docker build .
|
- apk add openssl-dev
|
||||||
stage: push
|
- cargo test
|
||||||
|
|
||||||
|
build-image:
|
||||||
|
stage: build-image
|
||||||
|
script:
|
||||||
|
- docker build -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
|
||||||
|
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
|
||||||
|
|
||||||
|
push-retagged-latest:
|
||||||
|
stage: push-retagged-latest
|
||||||
|
script:
|
||||||
|
- docker pull "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
|
||||||
|
- docker push "$CI_REGISTRY_IMAGE:latest"
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue