Compare commits

..
Author SHA1 Message Date
Brad Koehn e6ca092a14 added docker tag to match commit tag 2023-02-26 08:58:00 -06:00
Brad Koehn 90ad5e4126 tags working 2023-02-26 08:47:53 -06:00
Brad Koehn a6e6872913 fixed tag indexes. I hope 2023-02-26 08:43:16 -06:00
Brad Koehn b6a266eeb3 remove branch specifier 2023-02-26 08:40:24 -06:00
Brad Koehn 28b4645545 branch name 2023-02-26 08:32:25 -06:00
Brad Koehn b89fdb75cb using tagged builds 2023-02-26 08:20:39 -06:00
6 changed files with 50 additions and 63 deletions

No files matched your search

-59
View File
@@ -1,59 +0,0 @@
name: ci
on:
push:
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Get Postgres and WAL-G versions
env:
TAG: ${{ gitea.ref_name }}
id: versions
run: |
echo "::set-output name=postgres::${TAG:0:4}"
echo "::set-output name=walg::${TAG:5:6}"
- name: Setup deployment key
env:
KEY: ${{ secrets.SSH_KEY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }}
run: |
mkdir "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
echo "$KEY" > "$HOME/.ssh/id_rsa"
chmod 600 "$HOME/.ssh/id_rsa"
ssh -o StrictHostKeyChecking=no -l root -- k3s-sd-03.koehn.com docker version
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
append: |
- endpoint: ssh://root@k3s-sd-03.koehn.com
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.koehn.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
needs: versions
with:
build-args: |
BASE=${{ steps.versions.outputs.postgres }}
WAL_G=${{ steps.versions.outputs.walg }}
push: true
platforms: linux/amd64,linux/arm64
tags: git.koehn.com/docker/postgres-wal-g:${{ steps.versions.outputs.postgres }}-${{ steps.versions.outputs.walg }}
+29
View File
@@ -0,0 +1,29 @@
stages:
- build
build:
stage: build
timeout: 3h
image:
name: moby/buildkit:latest
entrypoint: [""]
script:
- |
mkdir /root/.docker
cat > /root/.docker/config.json <<EOF
{
"auths": {
"https://index.docker.io/v1/": {
"auth":"${DOCKER_AUTH}"
},
"${CI_REGISTRY}": {
"username": "${CI_REGISTRY_USER}",
"password": "${CI_REGISTRY_PASSWORD}"
}
}
}
EOF
- buildctl-daemonless.sh build --frontend=dockerfile.v0 --local context=$CI_PROJECT_DIR --local dockerfile=$CI_PROJECT_DIR --output type=image,name=docker.io/koehn/postgres-wal-g:14.2-$CI_COMMIT_TAG,push=true --opt build-arg:BASE=14.2 --opt build-arg:WALG_RELEASE=$(echo $CI_COMMIT_TAG | awk -F '-' '{print $1}') --opt platform=linux/amd64
only:
- tags
+15
View File
@@ -0,0 +1,15 @@
pipeline:
build-image:
image: woodpeckerci/plugin-docker-buildx
when:
event: tag
secrets: [ docker_username, docker_password ]
settings:
repo: koehn/postgres-wal-g
tag: ${CI_COMMIT_TAG}
platforms: linux/amd64
mtu: 1300
build_args:
- BASE=${CI_COMMIT_TAG:0:4}
- WALG_RELEASE=${CI_COMMIT_TAG:5:6}
+2 -2
View File
@@ -1,8 +1,8 @@
ARG BASE=latest
ARG BASE
FROM golang:1 as build
ARG WALG_RELEASE=master
ARG WALG_RELEASE=v1.1
RUN apt-get update && apt-get install -qqy --no-install-recommends --no-install-suggests cmake liblzo2-dev libsodium23 libsodium-dev && \
cd /go/src/ && \
+3 -1
View File
@@ -1,3 +1,5 @@
[![status-badge](https://woodpecker.koehn.com/api/badges/docker/postgres-wal-g/status.svg)](https://woodpecker.koehn.com/docker/postgres-wal-g)
# Postgres WAL-G
This image extends the stock [Postgres Image](https://hub.docker.com/_/postgres/)
@@ -29,7 +31,7 @@ To run a full backup, simply run `/wal-g/backup.sh`.
## Continuous Backups
These will happen automatically once you've started Postgres with your edited
`postgresql.conf` file (see
[Configuration](#configuration), above).
[Configuration](https://gitlab.koehn.com/docker/postgres-wal-g#configuration), above).
## Recovery
Testing recovery is simple: run a new Docker container with the correct
+1 -1
View File
@@ -12,7 +12,7 @@ IMAGE_NAME=koehn/postgres-wal-g
build_image() {
BASE=$1
IMAGE=$IMAGE_NAME:$BASE-$WALG_VERSION
docker buildx build -t $IMAGE --push . --build-arg BASE=$PG_VERSION --build-arg WALG_RELEASE=$WALG_VERSION --ulimit memlock=16384:16384 --platform linux/amd64,linux/arm64 --builder multiarch
docker buildx build --builder k3s-sd -t $IMAGE --push . --build-arg BASE=$PG_VERSION --build-arg WALG_RELEASE=$WALG_VERSION --ulimit memlock=16384:16384
}
build_image "$PG_VERSION" "$WALG_VERSION"