Skip to content
This repository was archived by the owner on Oct 3, 2019. It is now read-only.
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
97 changes: 28 additions & 69 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,82 +1,41 @@
# Temporary Build Files
build/_output
build/_test
# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
projectile-bookmarks.eld
# directory configuration
.dir-locals.el
# saveplace
places
# url cache
url/cache/
# cedet
ede-projects.el
# smex
smex-items
# company-statistics
company-statistics-cache.el
# anaconda-mode
anaconda-mode/
### IntelliJ ###
.idea/
*.iws
*.iml
/out/
.idea_modules/

### Go ###
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, build with 'go test -c'

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
### Vim ###
# swap
.sw[a-p]
.*.sw[a-p]
# session
Session.vim
# temporary
.netrwhist
# auto-generated tag files
tags

### Go Patch ###
/vendor/
/Godeps/

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
### IDEA ###
.idea/*
### MISC ###
bin/*
vendor/*

# devconsole-operator binaries
bin/
tmp/

# Generated assets
37 changes: 37 additions & 0 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM centos:7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having two Dockerfiles, we should start using multi-staged Dockerfiles.

LABEL maintainer "Devtools <devtools@redhat.com>"
LABEL author "Devtools <devtools@redhat.com>"
ENV LANG=en_US.utf8
ARG USE_GO_VERSION_FROM_WEBSITE=0

# Some packages might seem weird but they are required by the RVM installer.
RUN yum install epel-release -y \
&& yum --enablerepo=centosplus --enablerepo=epel install -y \
findutils \
git \
$(test "$USE_GO_VERSION_FROM_WEBSITE" != 1 && echo "golang") \
make \
procps-ng \
tar \
wget \
which \
&& yum clean all

RUN if [[ "$USE_GO_VERSION_FROM_WEBSITE" = 1 ]]; then cd /tmp \
&& wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz \
&& echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.10.linux-amd64.tar.gz" > checksum \
&& sha256sum -c checksum \
&& tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz \
&& rm -f go1.10.linux-amd64.tar.gz; \
fi
ENV PATH=$PATH:/usr/local/go/bin

# Get dep for Go package management and make sure the directory has full rwz permissions for non-root users
ENV GOPATH /tmp/go
RUN mkdir -p $GOPATH/bin && chmod a+rwx $GOPATH
RUN cd $GOPATH/bin \
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o dep \
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep" > dep-linux-amd64.sha256 \
sha256sum -c dep-linux-amd64.sha256

ENTRYPOINT ["/bin/bash"]
18 changes: 18 additions & 0 deletions Dockerfile.deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM centos:7
LABEL maintainer "Devtools <devtools@redhat.com>"
LABEL author "Devtools <devtools@redhat.com>"
ENV LANG=en_US.utf8
ENV INSTALL_PREFIX=/usr/local/devconsole-operator

# Create a non-root user and a group with the same name: "devconsole-operator"
ENV F8_USER_NAME=devconsole-operator

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe let's get rid out of F8 prefix

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed befe3ef.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelkleinhenz no it wasn't fixed in befe3ef. The code is still in there. We have F8_ in various other locations and files as well if you take a look at the PR now. I suggest to keep the F8_ and not replace it now. The reason is that environment variables marked with F8_ are those that you should care about setting from the outside when running a Makefile for example: F8_POSTGRES_HOST=foo make test-integration. Can you revert the parts of befe3ef that modify the F8_ bits please and keep the rest until we have a proper replacement for F8_?

RUN useradd --no-create-home -s /bin/bash ${F8_USER_NAME}

COPY bin/devconsole-operator ${INSTALL_PREFIX}/bin/devconsole-operator

# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${F8_USER_NAME}

WORKDIR ${INSTALL_PREFIX}

ENTRYPOINT [ "bin/devconsole-operator" ]
19 changes: 19 additions & 0 deletions Dockerfile.deploy.rhel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM quay.io/openshiftio/rhel-base-golang:latest

LABEL maintainer "Devtools <devtools@redhat.com>"
LABEL author "Devtools <devtools@redhat.com>"
ENV LANG=en_US.utf8
ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator

# Create a non-root user and a group with the same name: "devconsole-operator"
ENV F8_USER_NAME=devconsole-operator
RUN useradd --no-create-home -s /bin/bash ${F8_USER_NAME}

COPY bin/devconsole-operator ${F8_INSTALL_PREFIX}/bin/devconsole-operator

# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${F8_USER_NAME}

WORKDIR ${F8_INSTALL_PREFIX}

ENTRYPOINT [ "bin/devconsole-operator" ]
7 changes: 7 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# TODO: change this to a sane base image
FROM quay.io/openshiftio/toolchain-operator:faab15e

ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator

COPY bin/devconsole-operator ${F8_INSTALL_PREFIX}/bin/devconsole-operator
RUN echo chmod +x ${F8_INSTALL_PREFIX}/bin/devconsole-operator
109 changes: 109 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,11 @@ required = [
[[prune.project]]
name = "k8s.io/code-generator"
non-go = false

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.3.0"

[[constraint]]
branch = "master"
name = "github.com/wadey/gocovmerge"
Loading