DiSh v0.1.2 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build, Push Images | |
on: | |
release: | |
types: [published] | |
env: | |
RELEASE: ${{ github.event.release.tag_name || 'latest' }} | |
jobs: | |
build-base-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and tag dish pash base image | |
run: | | |
cd docker-hadoop | |
docker build -t binpash/dish-pash-base:${{ env.RELEASE }} ./pash-base \ | |
--build-arg RELEASE=${{ env.RELEASE }} | |
# Tag the image with 'latest' | |
docker tag binpash/dish-pash-base:${{ env.RELEASE }} \ | |
binpash/dish-pash-base:latest | |
- name: Push dish pash base image | |
run: | | |
docker push binpash/dish-pash-base:${{ env.RELEASE }} | |
docker push binpash/dish-pash-base:latest | |
- name: Build and tag hadoop pash base image | |
run: | | |
cd docker-hadoop | |
docker build -t binpash/hadoop-pash-base:${{ env.RELEASE }} ./base \ | |
--build-arg RELEASE=${{ env.RELEASE }} --build-arg BASE=binpash/dish-pash-base | |
# Tag the image with 'latest' | |
docker tag binpash/hadoop-pash-base:${{ env.RELEASE }} \ | |
binpash/hadoop-pash-base:latest | |
- name: Push hadoop pash base image | |
run: | | |
docker push binpash/hadoop-pash-base:${{ env.RELEASE }} | |
docker push binpash/hadoop-pash-base:latest | |
build-dependant-images: | |
runs-on: ubuntu-latest | |
needs: build-base-images | |
strategy: | |
matrix: | |
image: | |
- name: hadoop-namenode | |
path: ./namenode | |
base_image: hadoop-pash-base | |
- name: hadoop-datanode | |
path: ./datanode | |
base_image: hadoop-pash-base | |
- name: hadoop-resourcemanager | |
path: ./resourcemanager | |
base_image: hadoop-pash-base | |
- name: hadoop-nodemanager | |
path: ./nodemanager | |
base_image: hadoop-pash-base | |
- name: hadoop-historyserver | |
path: ./historyserver | |
base_image: hadoop-pash-base | |
- name: hadoop-submit | |
path: ./submit | |
base_image: hadoop-pash-base | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and tag Docker image | |
run: | | |
cd docker-hadoop | |
# Build Image | |
docker build -t binpash/${{ matrix.image.name }}:${{ env.RELEASE }} ${{ matrix.image.path }} \ | |
--build-arg RELEASE=${{ env.RELEASE }} --build-arg BASE=binpash/${{ matrix.image.base_image }} | |
# Tag the image with 'latest' | |
docker tag binpash/${{ matrix.image.name }}:${{ env.RELEASE }} binpash/${{ matrix.image.name }}:latest | |
- name: Push Docker image | |
run: | | |
docker push binpash/${{ matrix.image.name }}:${{ env.RELEASE }} | |
docker push binpash/${{ matrix.image.name }}:latest |