-
Notifications
You must be signed in to change notification settings - Fork 10
203 lines (194 loc) · 7.54 KB
/
images-creator.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# This workflow creates docker images that are then used for:
#
# - DIRAC distribution (create DIRAC release tarballs)
# - running DIRAC integration tests in GitHub actions (slc6+cc7+c8)
#
# All created images are then uploaded to GitHub packages and docker hub
name: Create images
on: push
# on:
# schedule:
# # every Sunday
# - cron: '0 0 * * 0'
jobs:
# Image for running dirac-distribution
dirac-distribution:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: |
echo $PWD
ls -l
docker build -t dirac-distribution dirac-distribution/
- name: tag
run: |
docker tag dirac-distribution diracgrid/dirac-distribution:latest
docker tag dirac-distribution ghcr.io/diracgrid/management/dirac-distribution:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.DOCKER_HUB_USERNAME }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin;
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push diracgrid/dirac-distribution:latest;
docker push ghcr.io/diracgrid/management/dirac-distribution:latest;
else
echo "Skipping deploy no secrets present";
fi
# Now the images for running integration tests
docker-compose-dirac:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: docker build -t docker-compose-dirac docker-compose-dirac/
- name: tag
run: |
docker tag docker-compose-dirac diracgrid/docker-compose-dirac:latest
docker tag docker-compose-dirac ghcr.io/diracgrid/management/docker-compose-dirac:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.DOCKER_HUB_USERNAME }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin;
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push diracgrid/docker-compose-dirac:latest;
docker push ghcr.io/diracgrid/management/docker-compose-dirac:latest;
else
echo "Skipping deploy no secrets present";
fi
el9-dirac:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: docker build -t el9-dirac el9-dirac/
- name: tag
run: |
docker tag el9-dirac diracgrid/el9-dirac:latest
docker tag el9-dirac ghcr.io/diracgrid/management/el9-dirac:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.DOCKER_HUB_USERNAME }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin;
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push diracgrid/el9-dirac:latest;
docker push ghcr.io/diracgrid/management/el9-dirac:latest;
else
echo "Skipping deploy no secrets present";
fi
c8-dirac:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: docker build -t c8-dirac c8-dirac/
- name: tag
run: |
docker tag c8-dirac diracgrid/c8-dirac:latest
docker tag c8-dirac ghcr.io/diracgrid/management/c8-dirac:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.DOCKER_HUB_USERNAME }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin;
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push diracgrid/c8-dirac:latest;
docker push ghcr.io/diracgrid/management/c8-dirac:latest;
else
echo "Skipping deploy no secrets present";
fi
cc7-dirac:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: docker build -t cc7-dirac cc7-dirac/
- name: tag
run: |
docker tag cc7-dirac diracgrid/cc7-dirac:latest
docker tag cc7-dirac ghcr.io/diracgrid/management/cc7-dirac:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.DOCKER_HUB_USERNAME }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin;
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push diracgrid/cc7-dirac:latest;
docker push ghcr.io/diracgrid/management/cc7-dirac:latest;
else
echo "Skipping deploy no secrets present";
fi
# Image for deploying config files to CVMFS (GridFTP)
dirac-cvmfs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: |
echo $PWD
ls -l
docker build -t dirac-cvmfs dirac-cvmfs/
- name: tag
run: |
docker tag dirac-cvmfs diracgrid/dirac-cvmfs:latest
docker tag dirac-cvmfs ghcr.io/diracgrid/management/dirac-cvmfs:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.DOCKER_HUB_USERNAME }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin;
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push diracgrid/dirac-cvmfs:latest;
docker push ghcr.io/diracgrid/management/dirac-cvmfs:latest;
else
echo "Skipping deploy no secrets present";
fi
# Image for building DIRAOS
centos6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: |
echo $PWD
ls -l
docker build -t centos6 centos6/
- name: tag
run: |
docker tag centos6 diracgrid/centos6:latest
docker tag centos6 ghcr.io/diracgrid/management/centos6:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.DOCKER_HUB_USERNAME }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin;
echo ${{ secrets.CR_PAT }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push diracgrid/centos6:latest;
docker push ghcr.io/diracgrid/management/centos6:latest;
else
echo "Skipping deploy no secrets present";
fi