Skip to content

Commit

Permalink
chore(release): use robot for deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
ecordell committed Jan 23, 2020
1 parent b7af076 commit 47fd071
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 32 deletions.
20 changes: 8 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
language: go
go:
- 1.13
sudo: true

os:
- linux
- osx
- windows

install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install make; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install make; fi

script:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then mingw32-make build; fi
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then make unit build; fi

notifications:
email: false

deploy:
xdeploy:
provider: releases
api_key:
secure: CMJ3KGhwuB7YRCYsJMe0cWAY/gkj2BVGorW9G1awxOyR2+Dv9G5PhItVkVfti0P2LzX8K2rplDp4O8b976wWzWJlJ6MQsSkFId0wYJSXRwNGdqnGhTLdDXB4FmPKapTBqTaYQgumrfvSOMiZ3tAwCD9AjW2fqYnBWnJXJ3yv8cpmN+TOZLJAKG+wAqb2foD9mS3HEQ9ItcoBqqEg8eRedzLuLGKVROLdFweLpi9gWdC22xLNomySwITTXX4kVs35MS0iwZE2cpTNDR8tLLIirHNgkiCCVYdiY0AB77Ikp5AF458UA064yr1b8TjAC3oyi4h6ddFaXo6CT9PZmsc41Te7cguSm2J9Ok2OdxLGitce7oty38QeY0QaG0oolcbXYw6QeiUXJ3BScAzVQBveDYgIACkSlsXAFEgdmR9YLOjYcw1MmquhmDbEuvaHi5T85aqsL8v5PUTMZq9+X/wOTqzR6D+8nQGqvqodxnopAFKpiR7UyiCl16VqrTJnkpWnYEerlx1i3Y7JLEiEK9O8UKL13J65cumCHPbcPNXbIsV6cFM+WXV8XhzKNOenrI5LZS9ske73wN9mOlgJKPwzEzP1H5hw1DTgm7gH/T+0bPCUdg7vh+dGavunjHEth1HmD2F8p6dvMC7+JG7Fjyw2PU76yl9DDm611p69A5auQ14=
file: bin/$TRAVIS_OS_NAME/opm
skip_cleanup: true
edge: true
token:
secure: uqVqegpAG8bxWUcDf4wX0bXRK7d2BV8llxUhHtduuMS9MB3h5R8VIi5wqPePmcbHwGbBGVsTdaOhfUWc+8AZ5/nrZhoYVHG10jaLGx9J6UdfQuy2S/dc4WUEorZl+aAAYDQCpA41e5pEBhudJjAYq/6Tz3JTQ9etU+TRqcHoSp2R4pN5wWjHX7mnmUohHJ9B71rEWb3QOfpL640Vy5n5G28DZpS9VFdzuEF5h4KHiXsggZ7ikaukdyQk9mpdpkDxngwstNJVfDslJP/xWOJr870hGFAri84aXGS62gdRhgDHnRlr5/KLI64MmYXvX+0LzlLOIMrN/+KqwyVlavOUhIjcFGdBYpWCzwHvWHnt994V50sHLJmJHrUWhysr6Jx6LDgmxTMUmz/uZqnO87ckwK3ROkl/6gEMoL4CTEQBUQ0rl+JslAAaVQAycv0/KSOVwp4OnaMfShvDesBOEIqhoSTIP8JGS7dN0o1O7bdj71+e3XYG9aqxvgQZt1/eiEADLgk96jyRVvZMLL9AZh8xtHqz3zh+R8E4Q0YJW425bAva0ThWL4RsNaT7JLhxbyDZUUdeSmhSszjACLEFJNkDPyGL7cKDLEt5UMqLyR+F+JTK3PLH2JJk9JxbznQDpX9sBs0oCoHbV5tJF2jACBYJKuA/WXXjMrzu2enjs2VjWlE=
file_glob: true
file: bin/**/*
cleanup: false
on:
repo: operator-framework/operator-registry
tags: true
branch: mkrelease
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ FROM openshift/origin-base
RUN mkdir /registry
WORKDIR /registry

COPY --from=builder /src/bin/linux/initializer /bin/initializer
COPY --from=builder /src/bin/linux/registry-server /bin/registry-server
COPY --from=builder /src/bin/linux/configmap-server /bin/configmap-server
COPY --from=builder /src/bin/linux/appregistry-server /bin/appregistry-server
COPY --from=builder /src/bin/linux/opm /bin/opm
COPY --from=builder /src/bin/linux-amd64/initializer /bin/initializer
COPY --from=builder /src/bin/linux-amd64/registry-server /bin/registry-server
COPY --from=builder /src/bin/linux-amd64/configmap-server /bin/configmap-server
COPY --from=builder /src/bin/linux-amd64/appregistry-server /bin/appregistry-server
COPY --from=builder /src/bin/linux-amd64/opm /bin/opm
COPY --from=builder /go/bin/grpc-health-probe /bin/grpc_health_probe

RUN chgrp -R 0 /registry && \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GOOS := $(shell go env GOOS)
OS := $(shell bash -c 'if [[ $(GOOS) == darwin ]]; then echo osx; else echo $(GOOS); fi')
CMDS := $(addprefix bin/$(OS)/, $(shell ls ./cmd))
GOARCH := $(shell go env GOARCH)
CMDS := $(addprefix bin/$(GOOS)-$(GOARCH)/, $(shell ls ./cmd))
SPECIFIC_UNIT_TEST := $(if $(TEST),-run $(TEST),)
MOD_FLAGS := $(shell bash -c 'if [[ "$(shell go env GOFLAGS)" == "-mod=vendor" ]]; then echo ""; else echo "-mod=vendor"; fi')

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build Status](https://travis-ci.com/operator-framework/operator-registry.svg?branch=master)](https://travis-ci.com/operator-framework/operator-registry)
# operator-registry

Operator Registry runs in a Kubernetes or OpenShift cluster to provide operator catalog data to [Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager).
Expand Down
5 changes: 1 addition & 4 deletions appr-registry.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ WORKDIR /go/src/$PROJECT
COPY --from=builder /go/src/github.com/operator-framework/operator-registry/vendor/$ORG/grpc-health-probe .
COPY --from=builder /go/src/github.com/operator-framework/operator-registry/vendor .
RUN CGO_ENABLED=0 go install -a -tags netgo -ldflags "-w"
RUN ls /go/bin
RUN ls .


FROM scratch
COPY --from=builder /go/src/github.com/operator-framework/operator-registry/bin/linux/appregistry-server /bin/appregistry-server
COPY --from=builder /go/src/github.com/operator-framework/operator-registry/bin/linux-amd64/appregistry-server /bin/appregistry-server
COPY --from=probe-builder /go/bin/grpc-health-probe /bin/grpc_health_probe
EXPOSE 50051
ENTRYPOINT ["/bin/appregistry-server"]
4 changes: 2 additions & 2 deletions configmap-registry.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM quay.io/operator-framework/upstream-registry-builder:latest as builder
FROM busybox as userspace

FROM scratch
COPY --from=builder /build/bin/linux/configmap-server /bin/configmap-server
COPY --from=builder /build/bin/linux/opm /bin/opm
COPY --from=builder /build/bin/linux-amd64/configmap-server /bin/configmap-server
COPY --from=builder /build/bin/linux-amd64/opm /bin/opm
COPY --from=userspace /bin/cp /bin/cp
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
EXPOSE 50051
Expand Down
2 changes: 1 addition & 1 deletion opm-example.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM quay.io/operator-framework/upstream-registry-builder AS builder
FROM scratch
LABEL operators.operatorframework.io.index.database.v1=./index.db
COPY database ./
COPY --from=builder /build/bin/linux/opm /opm
COPY --from=builder /build/bin/linux-amd64/opm /opm
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
EXPOSE 50051
ENTRYPOINT ["/opm"]
Expand Down
2 changes: 1 addition & 1 deletion registry.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
chmod +x /bin/grpc_health_probe

FROM scratch
COPY --from=builder /build/bin/linux/registry-server /registry-server
COPY --from=builder /build/bin/linux-amd64/registry-server /registry-server
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
EXPOSE 50051
ENTRYPOINT ["/registry-server"]
Expand Down
10 changes: 5 additions & 5 deletions upstream-builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN make static
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe
RUN cp /build/bin/linux/opm /bin/opm && \
cp /build/bin/linux/initializer /bin/initializer && \
cp /build/bin/linux/appregistry-server /bin/appregistry-server && \
cp /build/bin/linux/configmap-server /bin/configmap-server && \
cp /build/bin/linux/registry-server /bin/registry-server
RUN cp /build/bin/linux-amd64/opm /bin/opm && \
cp /build/bin/linux-amd64/initializer /bin/initializer && \
cp /build/bin/linux-amd64/appregistry-server /bin/appregistry-server && \
cp /build/bin/linux-amd64/configmap-server /bin/configmap-server && \
cp /build/bin/linux-amd64/registry-server /bin/registry-server

0 comments on commit 47fd071

Please sign in to comment.