mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
Merge branch 'adferrand:master' into master
This commit is contained in:
commit
b64bb4d1cc
@ -1,11 +1,14 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- job: build
|
- job: build
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-18.04
|
vmImage: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
docker pull adferrand/backuppc || true
|
set -e
|
||||||
docker build --pull --cache-from adferrand/backuppc -t adferrand/backuppc .
|
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
|
docker save adferrand/backuppc | gzip -c -1 > $(Build.ArtifactStagingDirectory)/docker-backuppc.tar.gz
|
||||||
displayName: Build container
|
displayName: Build container
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
@ -16,7 +19,7 @@ jobs:
|
|||||||
- job: unit_tests
|
- job: unit_tests
|
||||||
dependsOn: build
|
dependsOn: build
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-18.04
|
vmImage: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
@ -24,15 +27,16 @@ jobs:
|
|||||||
path: $(Build.SourcesDirectory)
|
path: $(Build.SourcesDirectory)
|
||||||
displayName: Retrieve Docker artifact
|
displayName: Retrieve Docker artifact
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
docker load < docker-backuppc.tar.gz
|
docker load < docker-backuppc.tar.gz
|
||||||
mkdir -p ./bin
|
mkdir -p ./bin
|
||||||
curl -fsSL https://goss.rocks/install | GOSS_DST=./bin sh
|
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
|
displayName: Run unit tests
|
||||||
- job: integration_tests
|
- job: integration_tests
|
||||||
dependsOn: build
|
dependsOn: build
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-18.04
|
vmImage: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
@ -40,6 +44,7 @@ jobs:
|
|||||||
path: $(Build.SourcesDirectory)
|
path: $(Build.SourcesDirectory)
|
||||||
displayName: Retrieve Docker artifact
|
displayName: Retrieve Docker artifact
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
docker load < docker-backuppc.tar.gz
|
docker load < docker-backuppc.tar.gz
|
||||||
docker run --name backuppc-integration --detach -p 8080:8080 adferrand/backuppc
|
docker run --name backuppc-integration --detach -p 8080:8080 adferrand/backuppc
|
||||||
sleep 5
|
sleep 5
|
||||||
|
@ -1,31 +1,25 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- job: docker
|
- job: docker
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-18.04
|
vmImage: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
inputs:
|
|
||||||
artifact: docker
|
|
||||||
path: $(Build.SourcesDirectory)
|
|
||||||
displayName: Retrieve Docker artifact
|
|
||||||
- task: Docker@2
|
- task: Docker@2
|
||||||
inputs:
|
inputs:
|
||||||
command: login
|
command: login
|
||||||
containerRegistry: docker-hub
|
containerRegistry: docker-hub
|
||||||
displayName: Login to DockerHub
|
displayName: Login to DockerHub
|
||||||
- script: |
|
- 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`
|
VERSION=`cat VERSION`
|
||||||
echo "Docker tag is: ${VERSION}"
|
echo "Docker tag is: ${VERSION}"
|
||||||
docker tag adferrand/backuppc adferrand/backuppc:4
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --tag adferrand/backuppc:${VERSION} --tag adferrand/backuppc:4 --tag adferrand/backuppc --push .
|
||||||
docker tag adferrand/backuppc "adferrand/backuppc:${VERSION}"
|
|
||||||
docker push "adferrand/backuppc:${VERSION}"
|
|
||||||
docker push adferrand/backuppc:4
|
|
||||||
docker push adferrand/backuppc
|
|
||||||
displayName: Tag and push Docker images to DockerHub
|
displayName: Tag and push Docker images to DockerHub
|
||||||
- job: github
|
- job: github
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-18.04
|
vmImage: ubuntu-20.04
|
||||||
|
dependsOn: docker
|
||||||
steps:
|
steps:
|
||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
inputs:
|
inputs:
|
||||||
@ -33,11 +27,13 @@ jobs:
|
|||||||
addToPath: true
|
addToPath: true
|
||||||
displayName: Install Python
|
displayName: Install Python
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
VERSION=`cat VERSION`
|
VERSION=`cat VERSION`
|
||||||
echo "Version is: $version"
|
echo "Version is: $version"
|
||||||
echo "##vso[task.setvariable variable=ReleaseVersion;]${VERSION}"
|
echo "##vso[task.setvariable variable=ReleaseVersion;]${VERSION}"
|
||||||
displayName: Get version
|
displayName: Get version
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
python utils/extract_changelog.py $(ReleaseVersion) > release_$(ReleaseVersion).md
|
python utils/extract_changelog.py $(ReleaseVersion) > release_$(ReleaseVersion).md
|
||||||
- task: GithubRelease@0
|
- task: GithubRelease@0
|
||||||
inputs:
|
inputs:
|
||||||
@ -46,10 +42,3 @@ jobs:
|
|||||||
releaseNotesFile: $(Build.SourcesDirectory)/release_$(ReleaseVersion).md
|
releaseNotesFile: $(Build.SourcesDirectory)/release_$(ReleaseVersion).md
|
||||||
addChangeLog: false
|
addChangeLog: false
|
||||||
displayName: Create GitHub Release
|
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
|
|
||||||
|
19
CHANGELOG.md
19
CHANGELOG.md
@ -2,6 +2,25 @@
|
|||||||
|
|
||||||
## master - CURRENT
|
## 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
|
## 4.4.0-6 - 28/06/2021
|
||||||
### Modified
|
### Modified
|
||||||
* Update base image to Alpine 3.14.0
|
* Update base image to Alpine 3.14.0
|
||||||
|
16
Dockerfile
16
Dockerfile
@ -1,11 +1,14 @@
|
|||||||
FROM alpine:3.14.0
|
FROM alpine:3.15.0
|
||||||
|
|
||||||
LABEL maintainer="Adrien Ferrand <ferrand.ad@gmail.com>"
|
LABEL maintainer="Adrien Ferrand <ferrand.ad@gmail.com>"
|
||||||
|
|
||||||
ENV BACKUPPC_VERSION 4.4.0
|
ARG BACKUPPC_VERSION="4.4.0"
|
||||||
ENV BACKUPPC_XS_VERSION 0.62
|
ARG BACKUPPC_XS_VERSION="0.62"
|
||||||
ENV RSYNC_BPC_VERSION 3.1.2.2
|
ARG RSYNC_BPC_VERSION="3.1.3.0"
|
||||||
ENV PAR2_VERSION v0.8.1
|
|
||||||
|
ENV BACKUPPC_VERSION="${BACKUPPC_VERSION}"
|
||||||
|
ENV BACKUPPC_XS_VERSION="${BACKUPPC_XS_VERSION}"
|
||||||
|
ENV RSYNC_BPC_VERSION="${RSYNC_BPC_VERSION}"
|
||||||
|
|
||||||
# Install backuppc runtime dependencies
|
# Install backuppc runtime dependencies
|
||||||
RUN apk --no-cache --update add \
|
RUN apk --no-cache --update add \
|
||||||
@ -13,7 +16,8 @@ RUN apk --no-cache --update add \
|
|||||||
supervisor \
|
supervisor \
|
||||||
perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing perl-json-xs \
|
perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing perl-json-xs \
|
||||||
expat samba-client iputils openssh openssl rrdtool ttf-dejavu \
|
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 \
|
&& apk --no-cache --update -X http://dl-cdn.alpinelinux.org/alpine/edge/community add par2cmdline \
|
||||||
# Install backuppc build dependencies
|
# Install backuppc build dependencies
|
||||||
&& apk --no-cache --update --virtual build-dependencies add \
|
&& apk --no-cache --update --virtual build-dependencies add \
|
||||||
|
@ -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_HOSTNAME#'"$LDAP_HOSTNAME"'#g' /etc/lighttpd/auth-ldap.conf
|
||||||
sed -i 's#LDAP_BASE_DN#'"$LDAP_BASE_DN"'#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_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_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
|
sed -i 's#LDAP_BIND_PW#'"$LDAP_BIND_PW"'#g' /etc/lighttpd/auth-ldap.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user