Skip to content

Commit

Permalink
NR-110006 chore: Update gostatsd base version to 35.1.19. Bump alpine…
Browse files Browse the repository at this point in the history
… to 3.17.3 (#41)

* NR-110006 chore: Update gostatsd base version to 35.1.19. Bump alpine to 3.17.3

* test arm before amd

* ci: run integrations tests in ubuntu

* dockerx
  • Loading branch information
rubenruizdegauna authored Apr 24, 2023
1 parent 441434c commit 43f18be
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 18 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Nightly build
on:
schedule:
- cron: "0 3 * * *"
push:
branches:
- master


env:
BASE_IMAGE_TAG: 3.17.3
GOSTATSD_TAG: 35.1.19
SNYK_TOKEN: ${{ secrets.CAOS_SNYK_TOKEN }}
TEST_IMAGE: "newrelic/nri-statsd:nightly"

jobs:
trivy_scanner:
name: Security scanner for docker image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.OHAI_DOCKER_HUB_ID }}
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }}

- name: Build image
run: |
make build/docker-amd64 BASE_IMAGE_TAG=${{ env.BASE_IMAGE_TAG }} GOSTATSD_TAG=${{ env.GOSTATSD_TAG }}
- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ env.SNYK_TOKEN }}
with:
image: ${{ env.TEST_IMAGE }}
args: --file=Dockerfile --severity-threshold=high

- name: Run Trivy to check Docker image for vulnerabilities
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.TEST_IMAGE }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: "CRITICAL,HIGH"
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- '*'

env:
BASE_IMAGE_TAG: 3.16.2
GOSTATSD_TAG: 35.1.2
BASE_IMAGE_TAG: 3.17.3
GOSTATSD_TAG: 35.1.19

jobs:
push_to_registry:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- README.md

env:
BASE_IMAGE_TAG: 3.16.2
GOSTATSD_TAG: 35.1.2
BASE_IMAGE_TAG: 3.17.3
GOSTATSD_TAG: 35.1.19
SNYK_TOKEN: ${{ secrets.CAOS_SNYK_TOKEN }}
TEST_IMAGE: "newrelic/nri-statsd:test"

Expand All @@ -38,6 +38,7 @@ jobs:
SNYK_TOKEN: ${{ env.SNYK_TOKEN }}
with:
image: ${{ env.TEST_IMAGE }}
args: --file=Dockerfile --severity-threshold=high

- name: Run Trivy to check Docker image for vulnerabilities
uses: aquasecurity/trivy-action@master
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ on:
- README.md

env:
BASE_IMAGE_TAG: 3.16.2
GOSTATSD_TAG: 35.1.2
BASE_IMAGE_TAG: 3.17.3
GOSTATSD_TAG: 35.1.19

jobs:
test:
name: Integration tests
# Use macos runner to be able to run different docker images architectures.
runs-on: macos-11
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [ amd64, arm64 ]
arch: [ arm64, amd64 ]
steps:
- uses: actions/checkout@v2

- name: Install docker
run: |
brew install docker colima
colima start --cpu 2 --memory 8
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BASE_IMAGE_TAG=3.16
ARG GOSTATSD_TAG=35.1.2
ARG BASE_IMAGE_TAG=3.17
ARG GOSTATSD_TAG=35.1.19

FROM atlassianlabs/gostatsd:$GOSTATSD_TAG as gostatsd

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PROJECT_WORKSPACE ?= $(CURDIR)
DOCKER_IMAGE_NAME ?= newrelic/nri-statsd
DOCKER_IMAGE_TAG ?= test
GOSTATSD_TAG ?= 35.1.2
BASE_IMAGE_TAG ?= 3.16
TEST_IMAGE_TAG ?= 1.19.1-alpine3.16
GOSTATSD_TAG ?= 35.1.19
BASE_IMAGE_TAG ?= 3.17
TEST_IMAGE_TAG ?= 1.19.8-alpine3.17

DOCKER_BUILD_CMD ?= docker build --pull \
--no-cache \
Expand Down

0 comments on commit 43f18be

Please sign in to comment.