You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.8 KiB
YAML

version: "3"
services:
runtime-setup:
image: netty-codec-quic-centos7:default
build:
context: ../
dockerfile: docker/Dockerfile.centos7
common: &common
image: netty-codec-quic-centos7:default
depends_on: [runtime-setup]
environment:
- GPG_KEYNAME
- GPG_PASSPHRASE
- GPG_PRIVATE_KEY
- MAVEN_OPTS
volumes:
- ~/.m2/repository:/root/.m2/repository
- ~/.ssh:/root/.ssh:delegated
- ~/.gnupg:/root/.gnupg:delegated
- ..:/code:delegated
working_dir: /code
build:
<<: *common
command: /bin/bash -cl "./mvnw -B -ntp clean package"
build-leak:
<<: *common
command: /bin/bash -cl "./mvnw -B -ntp -Pleak clean package"
build-no-unsafe:
<<: *common
command: /bin/bash -cl "./mvnw -B -ntp -PnoUnsafe clean package"
build-clean:
<<: *common
command: /bin/bash -cl "./mvnw -B -ntp clean package"
deploy:
<<: *common
command: /bin/bash -cl "./mvnw -B -ntp clean deploy -DskipTests=true"
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2/repository:/root/.m2/repository
- ~/.m2/settings.xml:/root/.m2/settings.xml
- ..:/code
deploy-clean:
<<: *common
command: /bin/bash -cl "./mvnw -B -ntp clean deploy -DskipTests=true"
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2/repository:/root/.m2/repository
- ~/.m2/settings.xml:/root/.m2/settings.xml
- ..:/code
stage-snapshot:
<<: *common
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2/settings.xml:/root/.m2/settings.xml
- ~/.m2/repository:/root/.m2/repository
- ~/local-staging:/root/local-staging
- ..:/code
command: /bin/bash -cl "./mvnw -B -ntp clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DaltStagingDirectory=/root/local-staging -DskipRemoteStaging=true -DskipTests=true"
stage-release:
<<: *common
volumes:
- ~/.ssh:/root/.ssh
- ~/.m2/settings.xml:/root/.m2/settings.xml
- ~/.m2/repository:/root/.m2/repository
- ~/local-staging:/root/local-staging
- ..:/code
command: /bin/bash -cl "cat <(echo -e \"${GPG_PRIVATE_KEY}\") | gpg --batch --import && ./mvnw -B -ntp clean javadoc:jar package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging -DaltStagingDirectory=/root/local-staging -DskipRemoteStaging=true -DskipTests=true -Dgpg.passphrase=${GPG_PASSPHRASE} -Dgpg.keyname=${GPG_KEYNAME}"
shell:
<<: *common
volumes:
- ~/.ssh:/root/.ssh:delegated
- ~/.gnupg:/root/.gnupg:delegated
- ~/.m2:/root/.m2:delegated
- ~/.gitconfig:/root/.gitconfig:delegated
- ~/.gitignore:/root/.gitignore:delegated
- ..:/code:delegated
entrypoint: /bin/bash