Skip to content

Commit

Permalink
add everything for cross compile etc
Browse files Browse the repository at this point in the history
  • Loading branch information
normanmaurer committed Dec 21, 2023
1 parent e21766c commit 2e48a6c
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 4 deletions.
80 changes: 80 additions & 0 deletions docker/docker-compose.centos-7-cross.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
version: "3"

services:

cross-compile-aarch64-runtime-setup:
image: netty-codec-ohttp-centos:cross_compile_aarch64
build:
context: ../
dockerfile: docker/Dockerfile.cross_compile_aarch64
args:
gcc_version: "10.2-2020.11"

cross-compile-aarch64-common: &cross-compile-aarch64-common
image: netty-codec-ohttp-centos:cross_compile_aarch64
depends_on: [cross-compile-aarch64-runtime-setup]
environment:
- GPG_KEYNAME
- GPG_PASSPHRASE
- GPG_PRIVATE_KEY
- MAVEN_OPTS
volumes:
- ~/.ssh:/root/.ssh:delegated
- ~/.gnupg:/root/.gnupg:delegated
- ~/.m2/repository:/root/.m2/repository
- ..:/code:delegated
working_dir: /code

cross-compile-aarch64-shell:
<<: *cross-compile-aarch64-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

cross-compile-aarch64-build:
<<: *cross-compile-aarch64-common
command: /bin/bash -cl "./mvnw -B -ntp clean package -Plinux-aarch64 -DskipTests"

cross-compile-aarch64-deploy:
<<: *cross-compile-aarch64-common
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2/repository:/root/.m2/repository
- ~/.m2/settings.xml:/root/.m2/settings.xml
command: /bin/bash -cl "./mvnw -B -ntp clean deploy -Plinux-aarch64 -DskipTests"

cross-compile-aarch64-stage-snapshot:
<<: *cross-compile-aarch64-common
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2/repository:/root/.m2/repository
- ~/.m2/settings.xml:/root/.m2/settings.xml
- ~/local-staging:/root/local-staging
- ..:/code
command: /bin/bash -cl "./mvnw -B -ntp -Plinux-aarch64 clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DaltStagingDirectory=/root/local-staging -DskipRemoteStaging=true -DskipTests=true"

cross-compile-aarch64-stage-release:
<<: *cross-compile-aarch64-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 -Plinux-aarch64 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}"

cross-compile-aarch64-install:
<<: *cross-compile-aarch64-common
volumes:
- ~/.ssh:/root/.ssh
- ~/.gnupg:/root/.gnupg
- ~/.m2:/root/.m2
- ..:/code
command: /bin/bash -cl "./mvnw -B -ntp clean install -Plinux-aarch64 -DskipTests=true"
36 changes: 36 additions & 0 deletions docker/docker-compose.centos-7.117.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3"

services:

runtime-setup:
image: netty-codec-ohttp-centos7:centos-7-17
build:
args:
java_version : "17.0.9-zulu"

build:
image: netty-codec-ohttp-centos7:centos-7-17

build-leak:
image: netty-codec-ohttp-centos7:centos-7-17

build-no-unsafe:
image: netty-codec-ohttp-centos7:centos-7-17

build-clean:
image: netty-codec-ohttp-centos7:centos-7-17

deploy:
image: netty-codec-ohttp-centos7:centos-7-17

deploy-clean:
image: netty-codec-ohttp-centos7:centos-7-17

stage-snapshot:
image: netty-codec-ohttp-centos7:centos-7-17

stage-release:
image: netty-codec-ohttp-centos7:centos-7-17

shell:
image: netty-codec-ohttp-centos7:centos-7-17
15 changes: 15 additions & 0 deletions docker/docker-compose.centos-7.18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,23 @@ services:
build-leak:
image: netty-codec-ohttp-centos7:centos-7-1.8

build-no-unsafe:
image: netty-codec-ohttp-centos7:centos-7-1.8

build-clean:
image: netty-codec-ohttp-centos7:centos-7-1.8

deploy:
image: netty-codec-ohttp-centos7:centos-7-1.8

deploy-clean:
image: netty-codec-ohttp-centos7:centos-7-1.8

stage-snapshot:
image: netty-codec-ohttp-centos7:centos-7-1.8

stage-release:
image: netty-codec-ohttp-centos7:centos-7-1.8

shell:
image: netty-codec-ohttp-centos7:centos-7-1.8
36 changes: 36 additions & 0 deletions docker/docker-compose.centos-7.21.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3"

services:

runtime-setup:
image: netty-codec-ohttp-centos7:centos-7-21
build:
args:
java_version : "21.0.1-zulu"

build:
image: netty-codec-ohttp-centos7:centos-7-21

build-leak:
image: netty-codec-ohttp-centos7:centos-7-21

build-no-unsafe:
image: netty-codec-ohttp-centos7:centos-7-21

build-clean:
image: netty-codec-ohttp-centos7:centos-7-21

deploy:
image: netty-codec-ohttp-centos7:centos-7-21

deploy-clean:
image: netty-codec-ohttp-centos7:centos-7-21

stage-snapshot:
image: netty-codec-ohttp-centos7:centos-7-21

stage-release:
image: netty-codec-ohttp-centos7:centos-7-21

shell:
image: netty-codec-ohttp-centos7:centos-7-21
47 changes: 43 additions & 4 deletions docker/docker-compose.centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,69 @@ services:
- GPG_PRIVATE_KEY
- MAVEN_OPTS
volumes:
- ~/.m2/repository:/root/.m2/repository
- ~/.ssh:/root/.ssh:delegated
- ~/.gnupg:/root/.gnupg:delegated
- ~/.m2/repository:/root/.m2/repository
- ..:/code:delegated
working_dir: /code

build:
<<: *common
command: /bin/bash -cl "./mvnw clean package"
command: /bin/bash -cl "./mvnw -B -ntp clean package"

build-leak:
<<: *common
command: /bin/bash -cl "./mvnw -Pleak clean package"
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 clean deploy -DskipTests=true"
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:
Expand Down

0 comments on commit 2e48a6c

Please sign in to comment.