Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
Open
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
32 changes: 14 additions & 18 deletions Dockerfile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
FROM golang:1.13.4-alpine as build
RUN mkdir -p /go/src/github.com/aosapps/drone-sonar-plugin
WORKDIR /go/src/github.com/aosapps/drone-sonar-plugin
COPY *.go ./
COPY vendor ./vendor/
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o drone-sonar
FROM golang:1.17-alpine as build

FROM openjdk:11.0.8-jre
WORKDIR /go/src/github.com/aosapps/drone-sonar-plugin

ARG SONAR_VERSION=4.5.0.2216
ARG SONAR_SCANNER_CLI=sonar-scanner-cli-${SONAR_VERSION}
ARG SONAR_SCANNER=sonar-scanner-${SONAR_VERSION}
COPY *.go /go/src/github.com/aosapps/drone-sonar-plugin/

RUN apt-get update \
&& apt-get install -y nodejs curl \
&& apt-get clean
RUN go mod init github.com/aosapps/drone-sonar-plugin \
&& go mod tidy \
&& GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o drone-sonar

FROM sonarsource/sonar-scanner-cli:4.6

COPY --from=build /go/src/github.com/aosapps/drone-sonar-plugin/drone-sonar /bin/
WORKDIR /bin

RUN curl https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/${SONAR_SCANNER_CLI}.zip -so /bin/${SONAR_SCANNER_CLI}.zip
RUN unzip ${SONAR_SCANNER_CLI}.zip \
&& rm ${SONAR_SCANNER_CLI}.zip
WORKDIR /bin

ENV PATH $PATH:/bin/${SONAR_SCANNER}/bin
RUN curl -fsSO https://letsencrypt.org/certs/lets-encrypt-r3-cross-signed.pem \
&& keytool -import -v -trustcacerts -cacerts -noprompt -storepass changeit \
-file lets-encrypt-r3-cross-signed.pem \
-alias "C=US, O=Let's Encrypt, CN=R3" \
&& rm lets-encrypt-r3-cross-signed.pem

ENTRYPOINT /bin/drone-sonar
Empty file modified logo.svg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion main.go
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package main

import (
"fmt"
"github.com/codegangsta/cli"
"os"

"github.com/urfave/cli"
)

var build = "1" // build number set at compile time
Expand Down
Empty file modified plugin.go
100755 → 100644
Empty file.
21 changes: 0 additions & 21 deletions vendor/github.com/codegangsta/cli/LICENSE

This file was deleted.

Loading