Skip to content

Commit

Permalink
Bump alpine from 3.14 to 3.17 (#28)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>

* Fix linting + builds

* Typo

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
  • Loading branch information
dependabot[bot] and julienduchesne authored Apr 20, 2023
1 parent 06406cf commit 379df48
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
18 changes: 11 additions & 7 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
},
};

[
Expand All @@ -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: [
Expand All @@ -79,7 +83,7 @@ local trigger(events) = {
} },
],
}
+ trigger(['push', 'tag']),
+ trigger(events=['pull_request', 'push', 'tag'], branches=['main']),

github_secret,
]
8 changes: 6 additions & 2 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
trigger:
event:
include:
- push
- pull_request
volumes:
- host:
path: /var/run/docker.sock
Expand Down Expand Up @@ -79,8 +79,12 @@ steps:
event:
- push
trigger:
branch:
include:
- main
event:
include:
- pull_request
- push
- tag
volumes:
Expand All @@ -95,6 +99,6 @@ kind: secret
name: github_token
---
kind: signature
hmac: 4b17799d53a83b7dc39f3d0a0a90bd32e0a654a2c619639f515f2e73768cb4fd
hmac: 14a3bd4b542025e1392b16e3c8b4b306eb689ff8fc2c02f371aee35757543edd

...
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
6 changes: 3 additions & 3 deletions pkg/slack/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 379df48

Please sign in to comment.