Skip to content

Commit c98f8b3

Browse files
author
Jelle Dijkstra
committed
Added build pipeline
1 parent 99f83fa commit c98f8b3

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: build
3+
env:
4+
image: pdok/mapserver-operator
5+
on:
6+
push:
7+
tags:
8+
- '*'
9+
jobs:
10+
docker:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Docker meta
14+
id: docker_meta
15+
uses: docker/metadata-action@v3
16+
with:
17+
images: ${{ env.image }}
18+
tags: |
19+
type=semver,pattern={{major}}
20+
type=semver,pattern={{major}}.{{minor}}
21+
type=semver,pattern={{version}}
22+
- name: Login to PDOK Docker Hub
23+
if: startsWith(env.image, 'pdok/')
24+
uses: docker/login-action@v1
25+
with:
26+
username: koalapdok
27+
password: ${{ secrets.DOCKERHUB_PUSH }}
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v1
30+
- name: Cache Docker layers
31+
uses: actions/cache@v4
32+
with:
33+
path: /tmp/.buildx-cache
34+
key: ${{ runner.os }}-buildx-${{ github.sha }}
35+
restore-keys: |
36+
${{ runner.os }}-buildx-
37+
- name: Build and push
38+
id: docker_build
39+
uses: docker/build-push-action@v2
40+
with:
41+
push: true
42+
tags: ${{ steps.docker_meta.outputs.tags }}
43+
labels: ${{ steps.docker_meta.outputs.labels }}
44+
cache-from: type=local,src=/tmp/.buildx-cache
45+
cache-to: type=local,dest=/tmp/.buildx-cache-new
46+
- # Temp fix to cleanup cache
47+
# https://github.com/docker/build-push-action/issues/252
48+
# https://github.com/moby/buildkit/issues/1896
49+
name: Move cache
50+
run: |
51+
rm -rf /tmp/.buildx-cache
52+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
53+
- name: Build result notification
54+
if: success() || failure()
55+
uses: 8398a7/action-slack@v3
56+
with:
57+
fields: all
58+
status: custom
59+
custom_payload: |
60+
{
61+
attachments: [{
62+
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
63+
text: `${process.env.AS_WORKFLOW} ${{ job.status }} for ${process.env.AS_REPO}!\n${process.env.AS_JOB} job on ${process.env.AS_REF} (commit: ${process.env.AS_COMMIT}, version: ${{ steps.docker_meta.outputs.version }}) by ${process.env.AS_AUTHOR} took ${process.env.AS_TOOK}`,
64+
}]
65+
}
66+
env:
67+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

internal/controller/blobdownload/blob_download.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ func GetBlobDownloadInitContainer[O pdoknlv3.WMSWFS](obj O, image, blobsConfigNa
5353
},
5454
},
5555
EnvFrom: []corev1.EnvFromSource{
56-
// Todo add this ConfigMap
5756
utils.NewEnvFromSource(utils.EnvFromSourceTypeConfigMap, blobsConfigName),
58-
// Todo add this Secret
5957
utils.NewEnvFromSource(utils.EnvFromSourceTypeSecret, blobsSecretName),
6058
},
6159
Resources: corev1.ResourceRequirements{

0 commit comments

Comments
 (0)