Skip to content

Merge pull request #154 from nikodemas/master #58

Merge pull request #154 from nikodemas/master

Merge pull request #154 from nikodemas/master #58

# Builds and publish spark/hadoop docker images
name: Build docker images
on:
push:
tags:
- 'v*.*.*'
jobs:
build-cmsmon-spark:
runs-on: ubuntu-latest
name: Build cmsmon-spark
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Get git tag
id: get_tag
run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Get cmsmon-spark Dockerfile
run: |
curl -ksLO https://raw.githubusercontent.com/dmwm/CMSKubernetes/master/docker/cmsmon-spark/Dockerfile
- name: Get helper script and make it executable
run: |
curl -ksLO https://raw.githubusercontent.com/dmwm/CMSKubernetes/master/docker/cmsmon-spark/install.sh
chmod +x install.sh
- name: Login to registry.cern.ch
uses: docker/login-action@v1
with:
registry: registry.cern.ch
username: ${{ secrets.CERN_LOGIN }}
password: ${{ secrets.CERN_TOKEN }}
- name: Publish cmsmon-spark image to registry.cern.ch
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
build-args: |
CMSSPARK_TAG=${{ steps.get_tag.outputs.tag }}
tags: registry.cern.ch/cmsmonitoring/cmsmon-spark:${{ steps.get_tag.outputs.tag }}, registry.cern.ch/cmsmonitoring/cmsmon-spark:latest