Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
prow update
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolan018 committed Mar 5, 2021
1 parent cc7a566 commit 376d4bb
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
37 changes: 37 additions & 0 deletions DCO
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
49 changes: 49 additions & 0 deletions Dockerfile.prow
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright Contributors to the Open Cluster Management project

FROM openshift/origin-release:golang-1.13 AS builder

ENV GOFLAGS="-mod=vendor"
COPY . /go/src/github.com/open-cluster-management/metrics-collector
RUN cd /go/src/github.com/open-cluster-management/metrics-collector && \
go build ./cmd/metrics-collector

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

ARG VCS_REF
ARG VCS_URL
ARG IMAGE_NAME
ARG IMAGE_DESCRIPTION
ARG IMAGE_DISPLAY_NAME
ARG IMAGE_NAME_ARCH
ARG IMAGE_MAINTAINER
ARG IMAGE_VENDOR
ARG IMAGE_VERSION
ARG IMAGE_RELEASE
ARG IMAGE_SUMMARY
ARG IMAGE_OPENSHIFT_TAGS

LABEL org.label-schema.vendor="Red Hat" \
org.label-schema.name="$IMAGE_NAME_ARCH" \
org.label-schema.description="$IMAGE_DESCRIPTION" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.license="Red Hat Advanced Cluster Management for Kubernetes EULA" \
org.label-schema.schema-version="1.0" \
name="$IMAGE_NAME" \
maintainer="$IMAGE_MAINTAINER" \
vendor="$IMAGE_VENDOR" \
version="$IMAGE_VERSION" \
release="$IMAGE_RELEASE" \
description="$IMAGE_DESCRIPTION" \
summary="$IMAGE_SUMMARY" \
io.k8s.display-name="$IMAGE_DISPLAY_NAME" \
io.k8s.description="$IMAGE_DESCRIPTION" \
io.openshift.tags="$IMAGE_OPENSHIFT_TAGS"

RUN microdnf update &&\
microdnf install ca-certificates vi --nodocs &&\
mkdir /licenses &&\
microdnf clean all

COPY --from=builder /go/src/github.com/open-cluster-management/metrics-collector/metrics-collector /usr/bin/
RUN cp /usr/bin/metrics-collector /usr/bin/telemeter-client
23 changes: 23 additions & 0 deletions Makefile.prow
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright Contributors to the Open Cluster Management project

-include /opt/build-harness/Makefile.prow

PKGS=$(shell go list ./... | grep -v '/vendor/|/test/(?!e2e)')

copyright-check:
./cicd-scripts/copyright-check.sh $(TRAVIS_BRANCH)

test-unit:
@echo "TODO: Run unit-tests"
go test -race -short $(PKGS) -count=1 -coverprofile cover.out

e2e-tests:
@echo "TODO: Run e2e-tests"

build:
go build ./cmd/metrics-collector

vendor:
go mod vendor
go mod tidy
go mod verify

0 comments on commit 376d4bb

Please sign in to comment.