Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump alpine from 3.14 to 3.17 #28

Merged
merged 3 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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