diff --git a/.azure-pipelines/templates/integration-jobs.yml b/.azure-pipelines/templates/integration-jobs.yml index c7decd4..19bf061 100644 --- a/.azure-pipelines/templates/integration-jobs.yml +++ b/.azure-pipelines/templates/integration-jobs.yml @@ -1,11 +1,14 @@ jobs: - job: build pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 steps: - script: | - docker pull adferrand/backuppc || true - docker build --pull --cache-from adferrand/backuppc -t adferrand/backuppc . + set -e + docker buildx create --use + VERSION=`cat VERSION` + echo "Docker tag is: ${VERSION}" + docker buildx build --platform linux/amd64 --tag adferrand/backuppc --load . docker save adferrand/backuppc | gzip -c -1 > $(Build.ArtifactStagingDirectory)/docker-backuppc.tar.gz displayName: Build container - task: PublishPipelineArtifact@1 @@ -16,7 +19,7 @@ jobs: - job: unit_tests dependsOn: build pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 steps: - task: DownloadPipelineArtifact@2 inputs: @@ -24,15 +27,16 @@ jobs: path: $(Build.SourcesDirectory) displayName: Retrieve Docker artifact - script: | + set -e docker load < docker-backuppc.tar.gz mkdir -p ./bin curl -fsSL https://goss.rocks/install | GOSS_DST=./bin sh - GOSS_PATH=./bin/goss GOSS_SLEEP=2 GOSS_FILES_PATH=./tests ./bin/dgoss run adferrand/backuppc + GOSS_PATH=./bin/goss GOSS_SLEEP=5 GOSS_FILES_PATH=./tests ./bin/dgoss run adferrand/backuppc displayName: Run unit tests - job: integration_tests dependsOn: build pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 steps: - task: DownloadPipelineArtifact@2 inputs: @@ -40,6 +44,7 @@ jobs: path: $(Build.SourcesDirectory) displayName: Retrieve Docker artifact - script: | + set -e docker load < docker-backuppc.tar.gz docker run --name backuppc-integration --detach -p 8080:8080 adferrand/backuppc sleep 5 diff --git a/.azure-pipelines/templates/release-jobs.yml b/.azure-pipelines/templates/release-jobs.yml index 85d76af..77c9341 100644 --- a/.azure-pipelines/templates/release-jobs.yml +++ b/.azure-pipelines/templates/release-jobs.yml @@ -1,31 +1,25 @@ jobs: - job: docker pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 steps: - - task: DownloadPipelineArtifact@2 - inputs: - artifact: docker - path: $(Build.SourcesDirectory) - displayName: Retrieve Docker artifact - task: Docker@2 inputs: command: login containerRegistry: docker-hub displayName: Login to DockerHub - script: | - docker load < docker-backuppc.tar.gz + set -e + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx create --use VERSION=`cat VERSION` echo "Docker tag is: ${VERSION}" - docker tag adferrand/backuppc adferrand/backuppc:4 - docker tag adferrand/backuppc "adferrand/backuppc:${VERSION}" - docker push "adferrand/backuppc:${VERSION}" - docker push adferrand/backuppc:4 - docker push adferrand/backuppc + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --tag adferrand/backuppc:${VERSION} --tag adferrand/backuppc:4 --tag adferrand/backuppc --push . displayName: Tag and push Docker images to DockerHub - job: github pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 + dependsOn: docker steps: - task: UsePythonVersion@0 inputs: @@ -33,11 +27,13 @@ jobs: addToPath: true displayName: Install Python - script: | + set -e VERSION=`cat VERSION` echo "Version is: $version" echo "##vso[task.setvariable variable=ReleaseVersion;]${VERSION}" displayName: Get version - script: | + set -e python utils/extract_changelog.py $(ReleaseVersion) > release_$(ReleaseVersion).md - task: GithubRelease@0 inputs: @@ -46,10 +42,3 @@ jobs: releaseNotesFile: $(Build.SourcesDirectory)/release_$(ReleaseVersion).md addChangeLog: false displayName: Create GitHub Release - - job: trigger_dockerhub - pool: - vmImage: ubuntu-18.04 - steps: - - script: | - curl -H "Content-Type: application/json" --data '{"docker_tag": "master"}' -X POST https://registry.hub.docker.com/u/adferrand/backuppc/trigger/$(DOCKERHUB_TRIGGER_ID)/ - displayName: Trigger DockerHub build diff --git a/CHANGELOG.md b/CHANGELOG.md index 503a707..a090ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ ## master - CURRENT +## 4.4.0-9 - 23/12/2021 +### Added +* Provide `pigz` utility to do faster GZIP archives + +### Modified +* Update base image to Alpine 3.15.0 + +## 4.4.0-8 - 10/10/2021 +### Added +* Docker image is now supporting multiple architectures: AMD64, ARM64 and ARMv7 + +### Modified +* Update base image to Alpine 3.14.2 + +## 4.4.0-7 - 05/08/2021 +### Modified +* Update rsync-bpc to 3.1.3.0 +* Fix processing of LDAP filter from environment variables (#58) + ## 4.4.0-6 - 28/06/2021 ### Modified * Update base image to Alpine 3.14.0 diff --git a/Dockerfile b/Dockerfile index cfeb167..b2210b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ -FROM alpine:3.14.0 +FROM alpine:3.15.0 LABEL maintainer="Adrien Ferrand " -ENV BACKUPPC_VERSION 4.4.0 -ENV BACKUPPC_XS_VERSION 0.62 -ENV RSYNC_BPC_VERSION 3.1.2.2 -ENV PAR2_VERSION v0.8.1 +ARG BACKUPPC_VERSION="4.4.0" +ARG BACKUPPC_XS_VERSION="0.62" +ARG RSYNC_BPC_VERSION="3.1.3.0" + +ENV BACKUPPC_VERSION="${BACKUPPC_VERSION}" +ENV BACKUPPC_XS_VERSION="${BACKUPPC_XS_VERSION}" +ENV RSYNC_BPC_VERSION="${RSYNC_BPC_VERSION}" # Install backuppc runtime dependencies RUN apk --no-cache --update add \ @@ -13,7 +16,8 @@ RUN apk --no-cache --update add \ supervisor \ perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing perl-json-xs \ expat samba-client iputils openssh openssl rrdtool ttf-dejavu \ - msmtp lighttpd lighttpd-mod_auth gzip apache2-utils tzdata libstdc++ libgomp \ + msmtp lighttpd lighttpd-mod_auth apache2-utils tzdata libstdc++ libgomp \ + gzip pigz \ && apk --no-cache --update -X http://dl-cdn.alpinelinux.org/alpine/edge/community add par2cmdline \ # Install backuppc build dependencies && apk --no-cache --update --virtual build-dependencies add \ diff --git a/VERSION b/VERSION index 1eae947..a8d5c47 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.4.0-6 \ No newline at end of file +4.4.0-9 \ No newline at end of file diff --git a/files/entrypoint.sh b/files/entrypoint.sh index dd38dd7..e9f5939 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -94,6 +94,7 @@ if [ -f /firstrun ]; then sed -i 's#LDAP_HOSTNAME#'"$LDAP_HOSTNAME"'#g' /etc/lighttpd/auth-ldap.conf sed -i 's#LDAP_BASE_DN#'"$LDAP_BASE_DN"'#g' /etc/lighttpd/auth-ldap.conf + LDAP_FILTER=$(sed 's#&#\\&#g' <<< "$LDAP_FILTER") sed -i 's#LDAP_FILTER#'"$LDAP_FILTER"'#g' /etc/lighttpd/auth-ldap.conf sed -i 's#LDAP_BIND_DN#'"$LDAP_BIND_DN"'#g' /etc/lighttpd/auth-ldap.conf sed -i 's#LDAP_BIND_PW#'"$LDAP_BIND_PW"'#g' /etc/lighttpd/auth-ldap.conf