From 379df483b038c4f3dc065aba0cfee44f11bdfaf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Apr 2023 12:46:51 -0400 Subject: [PATCH] Bump alpine from 3.14 to 3.17 (#28) * Bump alpine from 3.14 to 3.17 Bumps alpine from 3.14 to 3.17. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix linting + builds * Typo --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Julien Duchesne --- .drone/drone.jsonnet | 18 +++++++++++------- .drone/drone.yml | 8 ++++++-- Dockerfile | 2 +- pkg/handlers/health.go | 2 +- pkg/slack/noop.go | 6 +++--- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.drone/drone.jsonnet b/.drone/drone.jsonnet index 6665857..71b72ce 100644 --- a/.drone/drone.jsonnet +++ b/.drone/drone.jsonnet @@ -43,12 +43,16 @@ local dockerStep(name, commands) = step(name, [ }; local fetchTagsStep = step('fetch tags', commands=['git fetch --tags'], image='alpine/git'); -local trigger(events) = { - trigger: { - event: { - include: events, +local trigger(events=[], branches=[]) = { + trigger: + { + [if events != [] then 'event']: { + include: events, + }, + [if branches != [] then 'branch']: { + include: branches, + }, }, - }, }; [ @@ -64,7 +68,7 @@ local trigger(events) = { step('lint', ['golangci-lint run'], image='golangci/golangci-lint'), ], } - + trigger(['push']), + + trigger(events=['pull_request']), pipeline('docker') { steps: [ @@ -79,7 +83,7 @@ local trigger(events) = { } }, ], } - + trigger(['push', 'tag']), + + trigger(events=['pull_request', 'push', 'tag'], branches=['main']), github_secret, ] diff --git a/.drone/drone.yml b/.drone/drone.yml index b2ff841..bade2b8 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -21,7 +21,7 @@ steps: trigger: event: include: - - push + - pull_request volumes: - host: path: /var/run/docker.sock @@ -79,8 +79,12 @@ steps: event: - push trigger: + branch: + include: + - main event: include: + - pull_request - push - tag volumes: @@ -95,6 +99,6 @@ kind: secret name: github_token --- kind: signature -hmac: 4b17799d53a83b7dc39f3d0a0a90bd32e0a654a2c619639f515f2e73768cb4fd +hmac: 14a3bd4b542025e1392b16e3c8b4b306eb689ff8fc2c02f371aee35757543edd ... diff --git a/Dockerfile b/Dockerfile index c6913bf..fdf309f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /app COPY . /app/ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-extldflags "-static"' -o /app/flagger-k6-webhook cmd/main.go -FROM alpine:3.14 +FROM alpine:3.17 COPY --from=build /app/flagger-k6-webhook /usr/bin/flagger-k6-webhook COPY --from=loadimpact/k6 /usr/bin/k6 /usr/bin/k6 diff --git a/pkg/handlers/health.go b/pkg/handlers/health.go index ffba22e..6d6316f 100644 --- a/pkg/handlers/health.go +++ b/pkg/handlers/health.go @@ -2,7 +2,7 @@ package handlers import "net/http" -func HandleHealth(resp http.ResponseWriter, req *http.Request) { +func HandleHealth(resp http.ResponseWriter, _ *http.Request) { resp.WriteHeader(200) resp.Write([]byte("Good to go!")) //nolint:errcheck } diff --git a/pkg/slack/noop.go b/pkg/slack/noop.go index f840a3f..cc397e9 100644 --- a/pkg/slack/noop.go +++ b/pkg/slack/noop.go @@ -6,21 +6,21 @@ import ( type noopClient struct{} -func (c *noopClient) SendMessages(channels []string, text, context string) (map[string]string, error) { +func (c *noopClient) SendMessages(channels []string, text, _ string) (map[string]string, error) { if len(channels) > 0 { log.Debugf("Slack disabled. Would've sent the following message: %s", text) } return nil, nil } -func (c *noopClient) UpdateMessages(slackMessages map[string]string, text, context string) error { +func (c *noopClient) UpdateMessages(slackMessages map[string]string, text, _ string) error { if len(slackMessages) > 0 { log.Debugf("Slack disabled. Would've updated messages to: %s", text) } return nil } -func (c *noopClient) AddFileToThreads(slackMessages map[string]string, fileName, content string) error { +func (c *noopClient) AddFileToThreads(slackMessages map[string]string, fileName, _ string) error { if len(slackMessages) > 0 { log.Debugf("Slack disabled. Would've uploaded file named: %s", fileName) }