Skip to content

Commit

Permalink
Use default Dockerfile args on pipelines for both Base and Gostatsd i…
Browse files Browse the repository at this point in the history
…mages (#86)
  • Loading branch information
alvarocabanas authored Aug 8, 2024
1 parent c6f86e3 commit 13951ec
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 27 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
- master

env:
BASE_IMAGE_TAG: 3.19.1
GOSTATSD_TAG: 36.0.2
SNYK_TOKEN: ${{ secrets.CAOS_SNYK_TOKEN }}
TEST_IMAGE: "newrelic/nri-statsd:nightly"
DOCKER_IMAGE_TAG: "nightly"
Expand All @@ -28,7 +26,7 @@ jobs:

- name: Build image
run: |
make build/docker-amd64 BASE_IMAGE_TAG=${{ env.BASE_IMAGE_TAG }} GOSTATSD_TAG=${{ env.GOSTATSD_TAG }} DOCKER_IMAGE_TAG=${{ env.DOCKER_IMAGE_TAG }}
make build/docker-amd64 DOCKER_IMAGE_TAG=${{ env.DOCKER_IMAGE_TAG }}
- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
tags:
- '*'

env:
BASE_IMAGE_TAG: 3.19.1
GOSTATSD_TAG: 36.0.2

jobs:
push_to_registry:
runs-on: ubuntu-latest
Expand All @@ -35,9 +31,6 @@ jobs:
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
build-args: |
BASE_IMAGE_TAG=${{ env.BASE_IMAGE_TAG }}
GOSTATSD_TAG=${{ env.GOSTATSD_TAG }}
context: .
push: true
tags: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ on:
- README.md

env:
BASE_IMAGE_TAG: 3.19.1
GOSTATSD_TAG: 36.0.2
SNYK_TOKEN: ${{ secrets.CAOS_SNYK_TOKEN }}
TEST_IMAGE: "newrelic/nri-statsd:test"

Expand All @@ -30,7 +28,7 @@ jobs:

- name: Build image
run: |
make build/docker-amd64 BASE_IMAGE_TAG=${{ env.BASE_IMAGE_TAG }} GOSTATSD_TAG=${{ env.GOSTATSD_TAG }}
make build/docker-amd64
- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
paths-ignore:
- README.md

env:
BASE_IMAGE_TAG: 3.19.1
GOSTATSD_TAG: 36.0.2

jobs:
test:
name: Integration tests
Expand All @@ -36,4 +32,4 @@ jobs:

- name: Running integration tests
run: |
make integration-tests-${{ matrix.arch }} BASE_IMAGE_TAG=${{ env.BASE_IMAGE_TAG }} GOSTATSD_TAG=${{ env.GOSTATSD_TAG }}
make integration-tests-${{ matrix.arch }}
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
ARG BASE_IMAGE_TAG=3.20.2
ARG GOSTATSD_TAG=36.0.2
FROM atlassianlabs/gostatsd:36.0.2 as gostatsd

FROM atlassianlabs/gostatsd:$GOSTATSD_TAG as gostatsd

FROM alpine:$BASE_IMAGE_TAG
FROM alpine:3.20.2

RUN apk --no-cache add \
ca-certificates file
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
PROJECT_WORKSPACE ?= $(CURDIR)
DOCKER_IMAGE_NAME ?= newrelic/nri-statsd
DOCKER_IMAGE_TAG ?= test
GOSTATSD_TAG ?= 36.0.2
BASE_IMAGE_TAG ?= 3.19
TEST_IMAGE_TAG ?= 1.22.2-alpine3.19

DOCKER_BUILD_CMD ?= docker build --pull \
--no-cache \
-t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) \
--build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) \
--build-arg GOSTATSD_TAG=$(GOSTATSD_TAG) \
.

DOCKER_TEST_CMD ?= docker run -i \
Expand Down

0 comments on commit 13951ec

Please sign in to comment.