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:
|
||||
- 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
|
||||
|
@ -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
|
||||
|
19
CHANGELOG.md
19
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
|
||||
|
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>"
|
||||
|
||||
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 \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user