6
6
buildDockerImage :
7
7
env :
8
8
EXPORTER_NAME : elasticsearch-exporter
9
- name : Build docker image
9
+ strategy :
10
+ matrix :
11
+ docker : ['scratch','ubi']
12
+ name : Build docker image ${{ matrix.docker }}
10
13
runs-on : ubuntu-latest
11
14
steps :
12
15
- uses : actions/checkout@master
@@ -21,18 +24,16 @@ jobs:
21
24
run : exit 78
22
25
- name : Build image
23
26
run : |
24
- docker build --label release=${{ github.event.release.tag_name }} -f Dockerfile --target scratch -t artifactory.internal.sysdig.com/$EXPORTER_NAME:latest .
25
- docker build --label release=${{ github.event.release.tag_name }} -f Dockerfile --target ubi -t artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-ubi .
27
+ docker build --label release=${{ github.event.release.tag_name }} -f ./docker/Dockerfile --target ${{ matrix.docker }} -t artifactory.internal.sysdig.com/$EXPORTER_NAME:latest .
26
28
- name : Publish docker image
27
29
run : |
28
- docker tag artifactory.internal.sysdig.com/$EXPORTER_NAME:latest artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}
29
- docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}
30
- docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-ubi
30
+ docker tag artifactory.internal.sysdig.com/$EXPORTER_NAME:latest artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-${{ matrix.docker }}
31
+ docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:${{ github.event.release.tag_name }}-${{ matrix.docker }}
31
32
docker push artifactory.internal.sysdig.com/$EXPORTER_NAME:latest
32
33
- name : Upload master to Quay.io
33
34
uses : fjogeleit/http-request-action@master
34
35
with :
35
- url : ' https://sysdig-jenkins.internal.sysdig.com/view/Integrations/job/integrations-elasticsearch -exporter/buildWithParameters?token=${{ secrets.JENKINS_PROMCAT_LAUNCH_TOKEN }}&EXPORTER=elasticsearch -exporter&DRY_RUN=false'
36
+ url : ' https://sysdig-jenkins.internal.sysdig.com/view/Integrations/job/integrations-redis -exporter/buildWithParameters?token=${{ secrets.JENKINS_PROMCAT_LAUNCH_TOKEN }}&EXPORTER=redis -exporter&DRY_RUN=false'
36
37
method : ' POST'
37
38
38
39
password : ${{ secrets.JENKINS_PROMCAT_API_TOKEN }}
0 commit comments