Commit 3b151cc9 authored by Geert-Johan Riemer's avatar Geert-Johan Riemer

.gitlab-ci, Dockerfiles: Don't build for master and tags, move to Go 1.12

parent d9910d11
Pipeline #53864891 passed with stages
in 25 minutes and 40 seconds
......@@ -107,6 +107,9 @@ Build:
stage: Build
script:
- skaffold build
except:
- master
- tags
tags:
- nlx
- shell-executor
......
# Use go 1.x based on the latest alpine image.
FROM golang:1.11-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......
FROM golang:1.11-alpine AS build-cfssl
FROM golang:1.12-alpine AS build-cfssl
# Build and install cfssl binaries
RUN apk add --update git g++
......
# Use go 1.x based on the latest alpine image.
FROM golang:1.11-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......@@ -20,8 +20,8 @@ COPY .git /go/src/go.nlx.io/nlx/directory-inspection-api/.
WORKDIR /go/src/go.nlx.io/nlx/directory-inspection-api
RUN GIT_COMMIT_HASH=$(git rev-parse HEAD) && \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
-ldflags="-X 'go.nlx.io/nlx/common/version.BuildSourceHash=$GIT_COMMIT_HASH' -X 'go.nlx.io/nlx/common/version.BuildVersion=$GIT_TAG_NAME'" \
-o dist/bin/nlx-directory-inspection-api ./cmd/nlx-directory-inspection-api
......
# Use go 1.x based on the latest alpine image.
FROM golang:1.11-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......@@ -20,8 +20,8 @@ COPY .git /go/src/go.nlx.io/nlx/directory-monitor/.git
WORKDIR /go/src/go.nlx.io/nlx/directory-monitor
RUN GIT_COMMIT_HASH=$(git rev-parse HEAD) && \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
-ldflags="-X 'go.nlx.io/nlx/common/version.BuildSourceHash=$GIT_COMMIT_HASH' -X 'go.nlx.io/nlx/common/version.BuildVersion=$GIT_TAG_NAME'" \
-o dist/bin/nlx-directory-monitor ./cmd/nlx-directory-monitor
......
# Use go 1.x based on the latest alpine image.
FROM golang:1-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......@@ -20,8 +20,8 @@ COPY .git /go/src/go.nlx.io/nlx/directory-registration-ap
WORKDIR /go/src/go.nlx.io/nlx/directory-registration-api
RUN GIT_COMMIT_HASH=$(git rev-parse HEAD) && \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
-ldflags="-X 'go.nlx.io/nlx/common/version.BuildSourceHash=$GIT_COMMIT_HASH' -X 'go.nlx.io/nlx/common/version.BuildVersion=$GIT_TAG_NAME'" \
-o dist/bin/nlx-directory-registration-api ./cmd/nlx-directory-registration-api
......
# Use go 1.x based on the latest alpine image.
FROM golang:1.11-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......@@ -21,8 +21,8 @@ COPY .git /go/src/go.nlx.io/nlx/insight-api/.git
WORKDIR /go/src/go.nlx.io/nlx/insight-api
RUN GIT_COMMIT_HASH=$(git rev-parse HEAD) && \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
-ldflags="-X 'go.nlx.io/nlx/common/version.BuildSourceHash=$GIT_COMMIT_HASH' -X 'go.nlx.io/nlx/common/version.BuildVersion=$GIT_TAG_NAME'" \
-o dist/bin/nlx-insight-api ./cmd/nlx-insight-api
......
# Use go 1.x based on the latest alpine image.
FROM golang:1.11-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......@@ -22,8 +22,8 @@ COPY .git /go/src/go.nlx.io/nlx/inway/
WORKDIR /go/src/go.nlx.io/nlx/inway
RUN GIT_COMMIT_HASH=$(git rev-parse HEAD) && \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
-ldflags="-X 'go.nlx.io/nlx/common/version.BuildSourceHash=$GIT_COMMIT_HASH' -X 'go.nlx.io/nlx/common/version.BuildVersion=$GIT_TAG_NAME' " \
-o dist/bin/nlx-inway ./cmd/nlx-inway
......
# Use go 1.x based on the latest alpine image.
FROM golang:1.11-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......@@ -21,8 +21,8 @@ COPY .git /go/src/go.nlx.io/nlx/outway/.git
WORKDIR /go/src/go.nlx.io/nlx/outway
RUN GIT_COMMIT_HASH=$(git rev-parse HEAD) && \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
-ldflags="-X 'go.nlx.io/nlx/common/version.BuildSourceHash=$GIT_COMMIT_HASH' -X 'go.nlx.io/nlx/common/version.BuildVersion=$GIT_TAG_NAME' " \
-o dist/bin/nlx-outway ./cmd/nlx-outway
......
# Use go 1.x based on the latest alpine image.
FROM golang:1.11-alpine AS build
FROM golang:1.12-alpine AS build
# Install build tools.
RUN apk add --update git gcc musl-dev
......@@ -20,8 +20,8 @@ COPY .git /go/src/go.nlx.io/nlx/txlog-api/.git
WORKDIR /go/src/go.nlx.io/nlx/txlog-api
RUN GIT_COMMIT_HASH=$(git rev-parse HEAD) && \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
GIT_TAG_NAME=$(git describe --tags) && \
go build \
-ldflags="-X 'go.nlx.io/nlx/common/version.BuildSourceHash=$GIT_COMMIT_HASH' -X 'go.nlx.io/nlx/common/version.BuildVersion=$GIT_TAG_NAME'" \
-o dist/bin/nlx-txlog-api ./cmd/nlx-txlog-api
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment