gitlab-notification/.gitlab-ci.yml
Struchkov Mark 4c29346524 fix cicd
2022-01-30 12:35:24 +03:00

36 lines
791 B
YAML

stages:
- build
- deploy
build:
image: maven:3.8.4-openjdk-17
stage: build
variables:
MAVEN_OPTS: "-Dmaven.repo.local=./.m2/repository"
only:
- test
# - /^v.*$/
# except:
# - branches
script:
- 'mvn -U clean package'
artifacts:
paths:
- gitlab-app/target/gitlab-notification.jar
docker-build:
image: upagge/docker-buildx:latest
stage: deploy
only:
# - /^v.*$/
- test
# except:
# - branches
services:
- docker:dind
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
script:
- cd gitlab-app
- docker buildx create --use
- docker buildx build --push --platform linux/amd64,linux/arm64/v8,windows/amd64 -t "$CI_REGISTRY_IMAGE:latest" .