Skip to content

Commit fd5335c

Browse files
authored
Merge pull request #196 from deniszh/DZ-prep-1.1.9
Preparing 1.1.9 release, enablling ghcr.io upload
2 parents 8e23b77 + a4665a2 commit fd5335c

6 files changed

Lines changed: 32 additions & 50 deletions

File tree

.github/workflows/master-publish.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches: [ master ]
66

7-
env:
8-
PYPY_IMAGE: jamiehewland/alpine-pypy:3.6-7.3-alpine3.11
9-
107
jobs:
118
build:
129
runs-on: ubuntu-latest
@@ -38,12 +35,9 @@ jobs:
3835
- name: Build and push amd64 python3 image to Docker Hub
3936
run: |
4037
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:master .
41-
# - name: Build and push amd64 pypy image to Docker Hub
42-
# run: |
43-
# docker buildx build --platform=linux/amd64 --build-arg BASEIMAGE=${PYPY_IMAGE} --build-arg python_binary=/usr/local/bin/pypy3 --build-arg python_extra_flags="" --push -t graphiteapp/graphite-statsd:master-pypy .
44-
# - name: Login to ghcr.io
45-
# run: |
46-
# echo "${{ secrets.GHCR_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
47-
# - name: Build and push amd64 pypy image to ghcr.io
48-
# run: |
49-
# docker buildx build --platform=linux/amd64 --build-arg BASEIMAGE=${PYPY_IMAGE} --build-arg python_binary=/usr/local/bin/pypy3 --push -t ghcr.io/graphite-project/graphite-statsd:test-pypy .
38+
- name: Login to ghcr.io
39+
run: |
40+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
41+
- name: Build and push amd64 image to ghcr.io
42+
run: |
43+
docker buildx build --platform=linux/amd64 --push -t ghcr.io/${{ github.actor }}/graphite-statsd:master .

.github/workflows/release-publish.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
release:
55
types: [ published ]
66

7-
env:
8-
PYPY_IMAGE: jamiehewland/alpine-pypy:3.6-7.3-alpine3.11
9-
107
jobs:
118
build:
129
runs-on: ubuntu-latest
@@ -43,27 +40,22 @@ jobs:
4340
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
4441
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:${VERSION} .
4542
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:latest .
46-
# - name: Build and push amd64 pypy image to Docker Hub
47-
# run: |
48-
# # Strip git ref prefix from version
49-
# VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
50-
# # Strip "v" prefix from tag name
51-
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo ${VERSION} | sed -e 's/^v//')
52-
# docker buildx build --platform=linux/amd64 --build-arg BASEIMAGE=${PYPY_IMAGE} --build-arg python_binary=/usr/local/bin/pypy3 --build-arg python_extra_flags="" --push -t graphiteapp/graphite-statsd:${VERSION}-pypy .
5343
- name: Build and push multi-platform images to Docker Hub
5444
run: |
5545
# Strip git ref prefix from version
5646
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
5747
# Strip "v" prefix from tag name
5848
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo ${VERSION} | sed -e 's/^v//')
59-
docker buildx build --platform=linux/arm,linux/arm64,linux/s390x,linux/amd64 --push -t graphiteapp/graphite-statsd:${VERSION} .
60-
docker buildx build --platform=linux/arm,linux/arm64,linux/s390x,linux/amd64 --push -t graphiteapp/graphite-statsd:latest .
61-
# - name: Login to ghcr.io
62-
# run: |
63-
# echo "${{ secrets.GHCR_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
64-
# - name: Build and push amd64 pypy image to ghcr.io
65-
# run: |
66-
# docker buildx build --platform=linux/amd64 --build-arg BASEIMAGE=${PYPY_IMAGE} --build-arg python_binary=/usr/local/bin/pypy3 --push -t ghcr.io/graphite-project/graphite-statsd:test-pypy .
67-
# - name: Build and push multi-platform images to ghcr.io
68-
# run: |
69-
# docker buildx build --platform=linux/arm,linux/arm64,linux/amd64 --push -t ghcr.io/graphite-project/graphite-statsd:test .
49+
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t graphiteapp/graphite-statsd:${VERSION} .
50+
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t graphiteapp/graphite-statsd:latest .
51+
- name: Login to ghcr.io
52+
run: |
53+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
54+
- name: Build and push multi-platform images to ghcr.io
55+
run: |
56+
# Strip git ref prefix from version
57+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
58+
# Strip "v" prefix from tag name
59+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo ${VERSION} | sed -e 's/^v//')
60+
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t ghcr.io/graphite-project/graphite-statsd:${VERSION} .
61+
docker buildx build --platform=linux/arm/v7,linux/arm64/v8,linux/s390x,linux/amd64 --push -t ghcr.io/graphite-project/graphite-statsd:latest .

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ RUN apk add --update \
4040
FROM base as build
4141
LABEL maintainer="Denys Zhdanov <denis.zhdanov@gmail.com>"
4242

43-
ARG python_binary=python3
4443
ARG python_extra_flags="--single-version-externally-managed --root=/"
4544
ENV PYTHONDONTWRITEBYTECODE=1
4645

@@ -61,9 +60,9 @@ RUN true \
6160
mysql-dev \
6261
postgresql-dev \
6362
&& curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
64-
&& $python_binary /tmp/get-pip.py pip==20.1.1 setuptools==50.3.2 wheel==0.35.1 && rm /tmp/get-pip.py \
63+
&& python3 /tmp/get-pip.py pip==20.1.1 setuptools==50.3.2 wheel==0.35.1 && rm /tmp/get-pip.py \
6564
&& pip install virtualenv==16.7.10 \
66-
&& virtualenv -p $python_binary /opt/graphite \
65+
&& virtualenv -p python3 /opt/graphite \
6766
&& . /opt/graphite/bin/activate \
6867
&& echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so \
6968
&& pip install \
@@ -90,7 +89,7 @@ ARG whisper_repo=https://github.com/graphite-project/whisper.git
9089
RUN git clone -b ${whisper_version} --depth 1 ${whisper_repo} /usr/local/src/whisper \
9190
&& cd /usr/local/src/whisper \
9291
&& . /opt/graphite/bin/activate \
93-
&& $python_binary ./setup.py install $python_extra_flags
92+
&& python3 ./setup.py install $python_extra_flags
9493

9594
# install carbon
9695
ARG carbon_version=${version}
@@ -99,7 +98,7 @@ RUN . /opt/graphite/bin/activate \
9998
&& git clone -b ${carbon_version} --depth 1 ${carbon_repo} /usr/local/src/carbon \
10099
&& cd /usr/local/src/carbon \
101100
&& pip3 install -r requirements.txt \
102-
&& $python_binary ./setup.py install $python_extra_flags
101+
&& python3 ./setup.py install $python_extra_flags
103102

104103
# install graphite
105104
# pin pyparsing to 2.4.7 should be removed in 1.1.9 or later
@@ -110,7 +109,7 @@ RUN . /opt/graphite/bin/activate \
110109
&& cd /usr/local/src/graphite-web \
111110
&& pip3 install -r requirements.txt \
112111
&& pip3 install --no-deps --force-reinstall pyparsing==2.4.7 \
113-
&& $python_binary ./setup.py install $python_extra_flags
112+
&& python3 ./setup.py install $python_extra_flags
114113

115114
# install statsd
116115
ARG statsd_version=0.9.0

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ This repo was based on [@hopsoft's](https://github.com/hopsoft/) [docker-graphit
77

88
Any suggestions / patches etc. are welcome!
99

10-
#### Tags / architectures
10+
#### Tags / architectures history
1111
- Autobuild repo https://hub.docker.com/r/graphiteapp/docker-graphite-statsd (development repo, with automatic builds, unstable) is deprecated and was removed from Docker Hub. If you want to use unstable builds please use `master` tag in stable repo (https://hub.docker.com/r/graphiteapp/graphite-statsd).
12-
- Starting from `1.1.7-1` we building arm/arm64 versions too.
13-
- Starting from `1.1.7-6` we building '-pypy' version of x64 image too, use it in case of performance issues (see PR #151 for details).
12+
- Starting from `1.1.7-1` we're building arm/arm64 versions too.
13+
- Starting from `1.1.7-11` we're building linux/s390x versions too.
14+
- Starting from `1.1.7-6` and up to `1.1.8-5` we were building '-pypy' version of x64 image, but now pypy building is disabled because lacking recent pypy docker images based on Alpine.
15+
- Starting from `1.1.9-1` we're building we're building linux/arm/v7 and linux/arm64/v8 by default.
16+
- Starting from `1.1.9-1` we marked ghcr.io as preferred repository instead of Docker hub.
1417

1518
# Docker Image for Graphite & Statsd
1619

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
VERSION=1.1.8-6
2+
VERSION=1.1.8-7
33
docker build . \
4-
--build-arg python_binary=python3 --build-arg python_extra_flags="--single-version-externally-managed --root=/" \
4+
--build-arg python_extra_flags="--single-version-externally-managed --root=/" \
55
--no-cache --tag graphiteapp/graphite-statsd:$VERSION

build_pypy.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)