-
Notifications
You must be signed in to change notification settings - Fork 3
118 lines (93 loc) · 3.45 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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