mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-11 08:55:27 +03:00
Fix - docker builds for scorecard cron
Fixed the docker build for scorecard cron and as well as updated the integration to test for the docker builds.
This commit is contained in:
parent
cef322b809
commit
248fda288e
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
@ -84,7 +84,7 @@ jobs:
|
||||
ginkgo --focus="E2E TEST:executable|E2E TEST:blob" ./e2e/...
|
||||
|
||||
- name: Build docker image
|
||||
run: docker build . --file Dockerfile --tag $IMAGE_NAME
|
||||
run: make dockerbuild
|
||||
|
||||
- name: Test docker image
|
||||
env:
|
||||
|
@ -11,12 +11,21 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
FROM golang:1.16 as app
|
||||
COPY . /go/src/github.com/ossf/scorecard
|
||||
WORKDIR /go/src/github.com/ossf/scorecard
|
||||
RUN [ "go", "build", "."]
|
||||
|
||||
# syntax = docker/dockerfile:1-experimental
|
||||
|
||||
FROM golang:1.16 as base
|
||||
WORKDIR /src
|
||||
ENV CGO_ENABLED=0
|
||||
COPY go.* ./
|
||||
RUN go mod download
|
||||
COPY . ./
|
||||
|
||||
FROM base AS build
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /out/scorecard .
|
||||
|
||||
FROM gcr.io/cloud-builders/gsutil
|
||||
WORKDIR /go/src/github.com/ossf/scorecard
|
||||
COPY --from=app /go/src/github.com/ossf/scorecard /go/src/github.com/ossf/scorecard
|
||||
ENTRYPOINT [ "./scorecard" ]
|
||||
COPY --from=build /out/scorecard /
|
||||
ENTRYPOINT [ "/scorecard" ]
|
Loading…
Reference in New Issue
Block a user