Skip to content

docker

docker #123

Workflow file for this run

name: docker
on:
# Trigger this workflow when the "deploy" workflow has completed successfully
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run
workflow_run:
workflows:
- deploy
branches:
- master
types:
- completed
jobs:
# runs on x86-64 (xeon-d) host: matterhorn
image_amd64:
runs-on: [self-hosted, linux, X64]
# docker images are only built and published (to DockerHub) when merging
# to master (not a yet unmerged PR!)
if: github.ref == 'refs/heads/master'
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
steps:
- uses: actions/checkout@v2
- name: Set environment
run: |
echo AUTOBAHN_BUILD_DATE=`date -u +"%Y-%m-%d"` >> $GITHUB_ENV
echo AUTOBAHN_BUILD_ID=$(date --utc +%Y%m%d)-$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV
echo AUTOBAHN_VCS_REF=`git rev-parse --short ${GITHUB_SHA}` >> $GITHUB_ENV
echo AUTOBAHN_VERSION=$(grep -E '^(__version__)' ./autobahn/_version.py | cut -d ' ' -f3 | sed -e 's|[u"'\'']||g') >> $GITHUB_ENV
- name: Print environment
run: |
echo ""
echo "Build environment configured:"
echo ""
echo " AUTOBAHN_BUILD_DATE = ${AUTOBAHN_BUILD_DATE}"
echo " AUTOBAHN_BUILD_ID = ${AUTOBAHN_BUILD_ID}"
echo " AUTOBAHN_VCS_REF = ${AUTOBAHN_VCS_REF}"
echo " AUTOBAHN_VERSION = ${AUTOBAHN_VERSION}"
echo ""
echo "Wheels (source):"
echo " AWS_DEFAULT_REGION = ${AWS_DEFAULT_REGION}"
echo " AWS_S3_BUCKET_NAME = ${AWS_S3_BUCKET_NAME}"
echo ""
echo "Docker image (publish):"
echo " DOCKERHUB_USER = ${DOCKERHUB_USER}"
echo ""
- name: Build & publish Docker image for cpy-amd64
run: |
cd ./docker && \
make download_wheels && \
make build_cpy_amd64 && \
make test_cpy_amd64
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
make publish_cpy_amd64
- name: Build & publish Docker image for pypy-amd64
run: |
cd ./docker && \
make download_wheels && \
make build_pypy_amd64 && \
make test_pypy_amd64
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
make publish_pypy_amd64
# runs on ARM64v8 (AWS Graviton) host: buildbox-arm64.crossbario.com
# image_arm64:
# runs-on: [self-hosted, linux, ARM64]
# # docker images are only built and published (to DockerHub) when merging
# # to master (not a yet unmerged PR!)
# if: github.ref == 'refs/heads/master'
# env:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
# AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
# steps:
# - uses: actions/checkout@v2
# - name: Set environment
# run: |
# echo AUTOBAHN_BUILD_DATE=`date -u +"%Y-%m-%d"` >> $GITHUB_ENV
# echo AUTOBAHN_BUILD_ID=$(date --utc +%Y%m%d)-$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV
# echo AUTOBAHN_VCS_REF=`git rev-parse --short ${GITHUB_SHA}` >> $GITHUB_ENV
# echo AUTOBAHN_VERSION=$(grep -E '^(__version__)' ./autobahn/_version.py | cut -d ' ' -f3 | sed -e 's|[u"'\'']||g') >> $GITHUB_ENV
# - name: Print environment
# run: |
# echo ""
# echo "Build environment configured:"
# echo ""
# echo " AUTOBAHN_BUILD_DATE = ${AUTOBAHN_BUILD_DATE}"
# echo " AUTOBAHN_BUILD_ID = ${AUTOBAHN_BUILD_ID}"
# echo " AUTOBAHN_VCS_REF = ${AUTOBAHN_VCS_REF}"
# echo " AUTOBAHN_VERSION = ${AUTOBAHN_VERSION}"
# echo ""
# echo "Wheels (source):"
# echo " AWS_DEFAULT_REGION = ${AWS_DEFAULT_REGION}"
# echo " AWS_S3_BUCKET_NAME = ${AWS_S3_BUCKET_NAME}"
# echo ""
# echo "Docker image (publish):"
# echo " DOCKERHUB_USER = ${DOCKERHUB_USER}"
# echo ""
# - name: Build & publish Docker image for cpy-arm64
# run: |
# cd ./docker && \
# make download_wheels && \
# make build_cpy_arm64v8 && \
# make test_cpy_arm64v8
# docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
# make publish_cpy_arm64v8
# - name: Build & publish Docker image for pypy-arm64
# run: |
# cd ./docker && \
# make download_wheels && \
# make build_pypy_arm64v8 && \
# make test_pypy_arm64v8
# docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
# make publish_pypy_arm64v8