Skip to content

Commit

Permalink
Merge pull request #167 from deniszh/DZ-fix-S390x
Browse files Browse the repository at this point in the history
Trying to fix S390
  • Loading branch information
deniszh authored Feb 22, 2021
2 parents 323ab10 + 5e5162b commit 110f6fc
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
52 changes: 25 additions & 27 deletions .github/workflows/master-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Build master
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
PYPY_IMAGE: jamiehewland/alpine-pypy:3.6-7.3-alpine3.11
Expand All @@ -21,31 +19,31 @@ jobs:
platforms: all
# Buildx provides an easier way of building Docker images for other architectures
- uses: docker/setup-buildx-action@master
- name: Build s390 python3 image
- name: Build amd64 python3 image
run: |
docker buildx build --platform=linux/amd64 --load -t graphiteapp/graphite-statsd:master .
- name: Run Snyk to check amd64 python3 image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
image: graphiteapp/graphite-statsd:master
args: --file=Dockerfile --platform=linux/amd64 --project-name=graphite-project/docker-graphite-statsd
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push amd64 python3 image to Docker Hub
run: |
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:master .
- name: Build and push amd64 pypy image to Docker Hub
run: |
docker buildx build --platform=linux/s390x --load -t graphiteapp/graphite-statsd:master .
# - name: Run Snyk to check amd64 python3 image for vulnerabilities
# uses: snyk/actions/docker@master
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
# with:
# command: monitor
# image: graphiteapp/graphite-statsd:master
# args: --file=Dockerfile --platform=linux/amd64 --project-name=graphite-project/docker-graphite-statsd
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Build and push amd64 python3 image to Docker Hub
docker buildx build --platform=linux/amd64 --build-arg BASEIMAGE=${PYPY_IMAGE} --build-arg python_binary=/usr/local/bin/pypy3 --push -t graphiteapp/graphite-statsd:master-pypy .
# - name: Login to ghcr.io
# run: |
# docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:master .
# - name: Build and push amd64 pypy image to Docker Hub
# echo "${{ secrets.GHCR_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
# - name: Build and push amd64 pypy image to ghcr.io
# run: |
# docker buildx build --platform=linux/amd64 --build-arg BASEIMAGE=${PYPY_IMAGE} --build-arg python_binary=/usr/local/bin/pypy3 --push -t graphiteapp/graphite-statsd:master-pypy .
## - name: Login to ghcr.io
## run: |
## echo "${{ secrets.GHCR_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
## - name: Build and push amd64 pypy image to ghcr.io
## run: |
## 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 .
# 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 .
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ RUN true \
&& apk add --update --no-cache \
cairo \
cairo-dev \
collectd \
collectd-disk \
collectd-nginx \
findutils \
librrd \
logrotate \
Expand All @@ -34,6 +31,11 @@ RUN true \
/var/log/carbon \
/var/log/graphite

# optional packages (e.g. not exist on S390 in alpine 3.13 yet)
RUN apk add --update \
collectd collectd-disk collectd-nginx \
|| true

FROM base as build
LABEL maintainer="Denys Zhdanov <[email protected]>"

Expand Down Expand Up @@ -113,7 +115,7 @@ RUN git clone "${statsd_repo}" \
&& git checkout tags/v"${statsd_version}" \
&& npm install

# build go-carbon (experimental)
# build go-carbon (optional)
# https://github.com/go-graphite/go-carbon/pull/340
ARG gocarbon_version=0.15.6
ARG gocarbon_repo=https://github.com/go-graphite/go-carbon.git
Expand All @@ -122,7 +124,8 @@ RUN git clone "${gocarbon_repo}" /usr/local/src/go-carbon \
&& git checkout tags/v"${gocarbon_version}" \
&& make \
&& chmod +x go-carbon && mkdir -p /opt/graphite/bin/ \
&& cp -fv go-carbon /opt/graphite/bin/go-carbon
&& cp -fv go-carbon /opt/graphite/bin/go-carbon \
|| true

# install brubeck (experimental)
ARG brubeck_version=bc1f4d3debe5eec337e7d132d092968ad17b91db
Expand Down

0 comments on commit 110f6fc

Please sign in to comment.