@ -19,9 +19,9 @@ on:
###############################################
###############################################
# REQUIRED secrets
# REQUIRED secrets
# DOCKER_UN: ${{ secrets.Docker_Login }}
# DOCKER_UN: ${{ secrets.Docker_Login }}
# Username of docker login for pushing the images to repo $DOCKER_ORG
# Username of docker login for pushing the images to repo $DOCKER_ORG and $DOCKER_ORG_TESTS
# DOCKER_PW: ${{ secrets.Docker_Password }}
# DOCKER_PW: ${{ secrets.Docker_Password }}
# Password of docker login for pushing the images to repo $DOCKER_ORG
# Password of docker login for pushing the images to repo $DOCKER_ORG and $DOCKER_ORG_TESTS
# DOCKER_ORG: ${{ secrets.DOCKER_ORG }}
# DOCKER_ORG: ${{ secrets.DOCKER_ORG }}
# The docker repository where the images are pushed to.
# The docker repository where the images are pushed to.
# DOCKER_ORG_TESTS: ${{ secrets.DOCKER_ORG_TESTS }}
# DOCKER_ORG_TESTS: ${{ secrets.DOCKER_ORG_TESTS }}
@ -47,6 +47,7 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
@ -54,6 +55,7 @@ jobs:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
@ -69,16 +71,16 @@ jobs:
env:
env:
DOCKER_UN : ${{ secrets.Docker_Login }}
DOCKER_UN : ${{ secrets.Docker_Login }}
DOCKER_PW : ${{ secrets.Docker_Password }}
DOCKER_PW : ${{ secrets.Docker_Password }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
run : echo "$DOCKER_PW" | docker login --username $DOCKER_UN --password-stdin
run : echo "$DOCKER_PW" | docker login --username $DOCKER_UN --password-stdin
- name : Build all docker images
- name : Build all docker images
env:
env:
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
run : docker-compose -f tests/build.yml build
run : docker-compose -f tests/build.yml build
- name : Save all docker images
- name : Save all docker images
run : docker save ${{ secrets.DOCKER_ORG }}/admin ${{ secrets.DOCKER_ORG }}/clamav ${{ secrets.DOCKER_ORG }}/docs ${{ secrets.DOCKER_ORG }}/dovecot ${{ secrets.DOCKER_ORG }}/fetchmail ${{ secrets.DOCKER_ORG }}/nginx ${{ secrets.DOCKER_ORG }}/none ${{ secrets.DOCKER_ORG }}/postfix ${{ secrets.DOCKER_ORG }}/postgresql ${{ secrets.DOCKER_ORG }}/radicale ${{ secrets.DOCKER_ORG }}/rainloop ${{ secrets.DOCKER_ORG }}/roundcube ${{ secrets.DOCKER_ORG }}/rspamd ${{ secrets.DOCKER_ORG }}/setup ${{ secrets.DOCKER_ORG }}/traefik-certdumper ${{ secrets .DOCKER_ORG }}/unbound -o /images/images.tar.gz
run : docker save ${{ env.DOCKER_ORG }}/admin ${{ env.DOCKER_ORG }}/clamav ${{ env.DOCKER_ORG }}/docs ${{ env.DOCKER_ORG }}/dovecot ${{ env.DOCKER_ORG }}/fetchmail ${{ env.DOCKER_ORG }}/nginx ${{ env.DOCKER_ORG }}/none ${{ env.DOCKER_ORG }}/postfix ${{ env.DOCKER_ORG }}/postgresql ${{ env.DOCKER_ORG }}/radicale ${{ env.DOCKER_ORG }}/rainloop ${{ env.DOCKER_ORG }}/roundcube ${{ env.DOCKER_ORG }}/rspamd ${{ env.DOCKER_ORG }}/setup ${{ env.DOCKER_ORG }}/traefik-certdumper ${{ env .DOCKER_ORG }}/unbound -o /images/images.tar.gz
test-core:
test-core:
name : Perform core tests
name : Perform core tests
@ -98,13 +100,15 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
env:
env:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
@ -124,8 +128,8 @@ jobs:
run : python tests/compose/test.py core 2
run : python tests/compose/test.py core 2
env:
env:
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
test-fetchmail:
test-fetchmail:
name : Perform fetchmail tests
name : Perform fetchmail tests
@ -145,13 +149,15 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
env:
env:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
@ -172,7 +178,7 @@ jobs:
env:
env:
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
test-filters:
test-filters:
name : Perform filter tests
name : Perform filter tests
@ -192,13 +198,15 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
env:
env:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
@ -219,7 +227,7 @@ jobs:
env:
env:
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
test-rainloop:
test-rainloop:
name : Perform rainloop tests
name : Perform rainloop tests
@ -239,13 +247,15 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
env:
env:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
@ -265,8 +275,8 @@ jobs:
run : python tests/compose/test.py rainloop 2
run : python tests/compose/test.py rainloop 2
env:
env:
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
test-roundcube:
test-roundcube:
name : Perform roundcube tests
name : Perform roundcube tests
@ -286,13 +296,15 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
env:
env:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
@ -312,8 +324,8 @@ jobs:
run : python tests/compose/test.py roundcube 2
run : python tests/compose/test.py roundcube 2
env:
env:
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
test-webdav:
test-webdav:
name : Perform webdav tests
name : Perform webdav tests
@ -333,13 +345,15 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
env:
env:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
@ -360,7 +374,7 @@ jobs:
env:
env:
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
DOCKER_ORG : ${{ secrets .DOCKER_ORG }}
DOCKER_ORG : ${{ env .DOCKER_ORG }}
deploy:
deploy:
name : Deploy images
name : Deploy images
@ -387,6 +401,7 @@ jobs:
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
run : |
run : |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG_TESTS }}" >> $GITHUB_ENV
- name : Derive MAILU_VERSION for other branches than testing
- name : Derive MAILU_VERSION for other branches than testing
if : ${{ env.BRANCH != 'testing' }}
if : ${{ env.BRANCH != 'testing' }}
shell : bash
shell : bash
@ -394,10 +409,11 @@ jobs:
MAILU_BRANCH : ${{ env.BRANCH }}
MAILU_BRANCH : ${{ env.BRANCH }}
run : |
run : |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
echo "DOCKER_ORG=${{ secrets.DOCKER_ORG }}" >> $GITHUB_ENV
- name : Create folder for storing images
- name : Create folder for storing images
run : |
run : |
sudo mkdir -p /images
sudo mkdir -p /images
sudo chmod 777 /images
sudo chmod 777 /images
- name : Configure images folder for caching
- name : Configure images folder for caching
# For staging we do not deploy images. So we do not have to load them from cache.
# For staging we do not deploy images. So we do not have to load them from cache.
if : ${{ env.BRANCH != 'staging' }}
if : ${{ env.BRANCH != 'staging' }}
@ -412,8 +428,7 @@ jobs:
env:
env:
DOCKER_UN : ${{ secrets.Docker_Login }}
DOCKER_UN : ${{ secrets.Docker_Login }}
DOCKER_PW : ${{ secrets.Docker_Password }}
DOCKER_PW : ${{ secrets.Docker_Password }}
DOCKER_ORG : ${{ secrets.DOCKER_ORG }}
DOCKER_ORG : ${{ env.DOCKER_ORG }}
DOCKER_ORG_TESTS : ${{ secrets.DOCKER_ORG_TESTS }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
MAILU_VERSION : ${{ env.MAILU_VERSION }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
TRAVIS_BRANCH : ${{ env.BRANCH }}
run : bash tests/deploy.sh
run : bash tests/deploy.sh
@ -423,7 +438,7 @@ jobs:
name : CI-Done
name : CI-Done
#Returns true when none of the **previous** steps have failed or been canceled.
#Returns true when none of the **previous** steps have failed or been canceled.
if : ${{ success() }}
if : ${{ success() }}
needs :
needs:
- deploy
- deploy
runs-on : ubuntu-latest
runs-on : ubuntu-latest
steps:
steps: