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

Commit

Permalink
Merge pull request #73 from keptn-contrib/release-0.4.0
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
johannes-b authored Nov 21, 2019
2 parents 6a28e01 + b7eb423 commit 34b221c
Show file tree
Hide file tree
Showing 14 changed files with 614 additions and 1,051 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ deploy/scripts/creds_dt.json
deploy/scripts/*creds*.json
creds_dt.json

vendor/*
vendor/*

# GoLand IDE
.idea
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
sudo: true
dist: xenial
language: go
go:
- 1.12.x
env:
global:
- GO111MODULE=on
services:
- docker
before_install:
Expand All @@ -16,10 +21,6 @@ before_install:
- ./writeManifest.sh
- cat MANIFEST

install:
- go get -u github.com/golang/dep/cmd/dep
- dep ensure

jobs:
include:
- stage: feature/bug
Expand Down
29 changes: 20 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,32 @@
# This is based on Debian and sets the GOPATH to /go.
# https://hub.docker.com/_/golang
FROM golang:1.12 as builder
ARG version=develop

# Copy local code to the container image.
WORKDIR /go/src/github.com/keptn/dynatrace-service
COPY . .

ARG DEP_VERSION=0.5.3
RUN curl -L -s https://github.com/golang/dep/releases/download/v$DEP_VERSION/dep-linux-amd64 -o ./dep && \
chmod +x ./dep && \
./dep ensure
# Force the go compiler to use modules
ENV GO111MODULE=on
ENV BUILDFLAGS=""

# Copy `go.mod` for definitions and `go.sum` to invalidate the next layer
# in case of a change in the dependencies
COPY go.mod go.sum ./

# Download dependencies
RUN go mod download

ARG debugBuild

# set buildflags for debug build
RUN if [ ! -z "$debugBuild" ]; then export BUILDFLAGS='-gcflags "all=-N -l"'; fi

# Copy local code to the container image.
COPY . .

# Build the command inside the container.
# (You may fetch or manage dependencies here,
# either manually or with a tool like "godep".)
RUN CGO_ENABLED=0 GOOS=linux go build -v -o dynatrace-service
# (You may fetch or manage dependencies here, either manually or with a tool like "godep".)
RUN CGO_ENABLED=0 GOOS=linux go build $BUILDFLAGS -v -o dynatrace-service

# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
Expand Down
Loading

0 comments on commit 34b221c

Please sign in to comment.