This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
annotations: | |
deployment.kubernetes.io/revision: "1" | |
creationTimestamp: "2020-05-29T09:09:16Z" | |
generation: 2 | |
labels: | |
app: try1 | |
managedFields: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
items: | |
- apiVersion: v1 | |
kind: Service | |
metadata: | |
annotations: | |
kompose.cmd: kompose convert -f docker-compose.yaml -o localregistry.yaml | |
kompose.version: 1.1.0 (36652f6) | |
creationTimestamp: null | |
labels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make test-e2e-host-local | |
error: no token is currently in use for this session | |
/Library/Developer/CommandLineTools/usr/bin/make test-e2e HOST_REPO_PATH=/Users/xcoulon/code/go/src/github.com/codeready-toolchain/toolchain-e2e/../host-operator | |
error: no token is currently in use for this session | |
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux \ | |
go build \ | |
-ldflags "-X github.com/codeready-toolchain/toolchain-e2e/cmd/manager.Commit=73b2d4d3a38af7fe340db3e015ef28b7dafba81a-dirty -X github.com/codeready-toolchain/toolchain-e2e/cmd/manager.BuildTime=`date -u '+%Y-%m-%dT%H:%M:%SZ'`" \ | |
-o ./build/_output/bin/toolchain-e2e \ | |
cmd/manager/main.go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ( | |
// Constants for viper variable names. Will be used to set | |
// default values as well as to get each value | |
... | |
varLogLevel = "log.level" | |
) | |
func New() *Configuration { | |
c := Configuration{ | |
v: viper.New(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package configuration | |
var ( | |
// BuildCommit lastest build commit (set by build script) | |
BuildCommit = "unknown" | |
// BuildTime set by build script | |
BuildTime = "unknown" | |
) | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build image | |
FROM centos:7 as builder | |
... | |
ARG BUILD_COMMIT=unknown | |
ARG BUILD_TIME=unknown | |
RUN go build -ldflags "-X github.com/xcoulon/go-url-shortener/configuration.BuildCommit=${BUILD_COMMIT} -X github.com/xcoulon/go-url-shortener/configuration.BuildTime=${BUILD_TIME}" -o bin/go-url-shortener | |
... | |
# final image | |
FROM centos:7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(eval BUILD_COMMIT:=$(shell git rev-parse --short HEAD)) | |
$(eval BUILD_TIME:=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ')) | |
docker build --build-arg POSTGRES_HOST=`cat .tmp/postgres.host` \ | |
--build-arg POSTGRES_PORT=`cat .tmp/postgres.port` \ | |
--build-arg POSTGRES_PASSWORD=$(POSTGRES_PASSWORD) \ | |
--build-arg BUILD_COMMIT=$(BUILD_COMMIT) \ | |
--build-arg BUILD_TIME=$(BUILD_TIME) \ | |
. \ | |
-t xcoulon/go-url-shortener:$(BUILD_COMMIT) | |
docker tag xcoulon/go-url-shortener:$(BUILD_COMMIT) xcoulon/go-url-shortener:latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If nothing was specified, run all targets as if in a fresh clone | |
.PHONY: all | |
## Default target | |
all: start-db build kill-db clean | |
POSTGRES_PASSWORD:=mysecretpassword | |
UNAME_S := $(shell uname -s) | |
.PHONY: init | |
init: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build image | |
FROM centos:7 as builder | |
LABEL author="Xavier Coulon" | |
ENV LANG=en_US.utf8 | |
# Install wget and git | |
RUN yum --enablerepo=centosplus install -y \ | |
wget \ | |
git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: webapp | |
spec: | |
template: | |
metadata: | |
labels: | |
app: webapp | |
spec: |
NewerOlder