Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
44 changes: 44 additions & 0 deletions .codefresh/codefresh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# More examples of Codefresh YAML can be found at
# https://codefresh.io/docs/docs/yaml-examples/examples/
Comment thread
todaywasawesome marked this conversation as resolved.
Outdated

version: "1.0"
# Stages can help you organize your steps in stages
stages:
- "clone"
- "build"
- "promote"

steps:
clone:
title: "Cloning repository"
type: "git-clone"
repo: "todaywasawesome/kube-plex"
# CF_BRANCH value is auto set when pipeline is triggered
# Learn more at codefresh.io/docs/docs/codefresh-yaml/variables/
revision: "${{CF_BRANCH}}"
git: "github"
stage: "clone"

geterdone:
title: "Build and Test"
type: parallel
stage: "build"
steps:
build:
title: "Building Docker image"
type: "build"
image_name: "todaywasawesome/kube-plex"
working_directory: "${{clone}}"
tag: "${{CF_BRANCH_TAG_NORMALIZED}}"
dockerfile: "Dockerfile"
stage: "build"

push:
type: push
arguments:
candidate: '${{build}}'
tag: latest
image_name: "todaywasawesome/kube-plex"
registry: todaywasawesome
stage: "promote"

22 changes: 21 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
#Build Stage
FROM golang:1.14.2-alpine as builder
ENV GOPROXY=https://gocenter.io

#Add packages for dependency management
RUN apk add dep
RUN apk add git

#Copy project files and get dependencies
COPY . /go/src/github.com/munnerz/kube-plex
WORKDIR /go/src/github.com/munnerz/kube-plex
RUN set -x && \
go get . && \
dep ensure -v

#Run Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o kube-plex_linux_amd64 /go/src/github.com/munnerz/kube-plex
RUN ls /go/src/github.com/munnerz/kube-plex

#Copy into clean container
FROM alpine:3.6

ADD kube-plex_linux_amd64 /kube-plex
COPY --from=builder /go/src/github.com/munnerz/kube-plex/kube-plex_linux_amd64 /kube-plex
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/todaywasawesome/Atomic%20Cluster%2FPlex-kube?key=eyJhbGciOiJIUzI1NiJ9.NTgxYjcxMzk4MDM4OWEwMTAwZDFlNzkw.u79dSG8wLg7iLl47YDrhp31p_1ZnJv6HwJ198otYd7k&type=cf-1)]( https%3A%2F%2Fg.codefresh.io%2Fpipelines%2FPlex-kube%2Fbuilds%3Ffilter%3Dtrigger%3Abuild~Build%3Bpipeline%3A5e913ece618642555e116db3~Plex-kube)

# kube-plex

kube-plex is a scalable Plex Media Server solution for Kubernetes. It
Expand Down