fix: ci steps, disable arm5 and arm7 architectures

changes:
- Remove obsolete architectures and environment variables from the
  Makefile. Remove rpm-build steps. This will be exported in an own
  repository.
- Adapt the travis file. Remove obsolete architecture steps.
This commit is contained in:
Markus Pesch 2020-06-01 15:40:40 +02:00
parent 10069568f9
commit a1c28a0a2e
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 21 additions and 62 deletions

View File

@ -5,33 +5,18 @@ services:
jobs:
include:
- name: build-darwin-386
stage: build
script: make container-run/bin/darwin/386/flucky
- name: build-darwin-amd64
stage: build
script: make container-run/bin/darwin/amd64/flucky
- name: build-freebsd-amd64
stage: build
script: make container-run/bin/freebsd/amd64/flucky
- name: build-linux-386
stage: build
script: make container-run/bin/linux/386/flucky
- name: build-linux-amd64
stage: build
script: make container-run/bin/linux/amd64/flucky
- name: build-linux-arm5
stage: build
script: make container-run/bin/linux/arm/5/flucky
# - name: build-linux-arm5
# stage: build
# script: make container-run/bin/linux/arm/5/flucky
- name: build-linux-arm7
stage: build
script: make container-run/bin/linux/arm/7/flucky
# - name: build-linux-arm7
# stage: build
# script: make container-run/bin/linux/arm/7/flucky
- name: test-linux-amd64
stage: test
@ -41,7 +26,9 @@ jobs:
- name: deploy-container-amd64
stage: deploy
script: make container-image/push/amd64
branches:
only:
- master
notifications:
email:

View File

@ -1,9 +1,7 @@
# VERSION/RELEASE
# VERSION
# If no version is specified as a parameter of make, the last git hash
# value is taken.
EPOCH=0
VERSION?=$(shell git describe --abbrev=0)+$(shell date +'%Y%m%d%H%I%S')
RELEASE?=1
# GOPROXY settings
# If no GOPROXY environment variable available, the pre-defined GOPROXY from go
@ -17,38 +15,13 @@ GOPRIVATE?=$(shell go env GOPRIVATE)
# The CONTAINER_RUNTIME variable will be used to specified the path to a
# container runtime. This is needed to start and run a container images.
CONTAINER_RUNTIME?=$(shell which docker)
CONTAINER_IMAGE_VERSION?=latest
# BUILD_IMAGE
# Definition of the container build image, in which the BInary are compiled from
# source code
BUILD_IMAGE_REGISTRY:=docker.io
BUILD_IMAGE_NAMESPACE:=volkerraschek
BUILD_IMAGE_NAME:=build-image
BUILD_IMAGE_VERSION:=latest
BUILD_IMAGE_FULL=${BUILD_IMAGE_REGISTRY}/${BUILD_IMAGE_NAMESPACE}/${BUILD_IMAGE_NAME}:${BUILD_IMAGE_VERSION:v%=%}
BUILD_IMAGE_SHORT=${BUILD_IMAGE_NAMESPACE}/${BUILD_IMAGE_NAME}:${BUILD_IMAGE_VERSION:v%=%}
# BASE_IMAGE
# Definition of the base container image for flucky
BASE_IMAGE_REGISTRY:=docker.io
BASE_IMAGE_NAMESPACE:=library
BASE_IMAGE_NAME:=alpine
BASE_IMAGE_VERSION:=3.11.2
BASE_IMAGE_FULL=${BASE_IMAGE_REGISTRY}/${BASE_IMAGE_NAMESPACE}/${BASE_IMAGE_NAME}:${BASE_IMAGE_VERSION:v%=%}
BASE_IMAGE_SHORT=${BASE_IMAGE_NAMESPACE}/${BASE_IMAGE_NAME}:${BASE_IMAGE_VERSION:v%=%}
# CONTAINER_IMAGE
# Definition of the container image for flucky
CONTAINER_IMAGE_REGISTRY:=docker.io
CONTAINER_IMAGE_NAMESPACE:=volkerraschek
CONTAINER_IMAGE_NAME:=${EXECUTABLE}
CONTAINER_IMAGE_VERSION:=latest
CONTAINER_IMAGE_FULL=${CONTAINER_IMAGE_REGISTRY}/${CONTAINER_IMAGE_NAMESPACE}/${CONTAINER_IMAGE_NAME}:${CONTAINER_IMAGE_VERSION:v%=%}
CONTAINER_IMAGE_SHORT=${CONTAINER_IMAGE_NAMESPACE}/${CONTAINER_IMAGE_NAME}:${CONTAINER_IMAGE_VERSION:v%=%}
# EXECUTABLE
EXECUTABLE=flucky
# BINARIES
# ==============================================================================
EXECUTABLE=flucky
EXECUTABLE_TARGETS:= \
bin/linux/amd64/${EXECUTABLE} \
bin/linux/arm/5/${EXECUTABLE} \
@ -125,8 +98,8 @@ test/coverage: test/unit
PHONY+=container-image/build/amd64
container-image/build/amd64:
${CONTAINER_RUNTIME} build \
--build-arg BASE_IMAGE=${BASE_IMAGE_FULL} \
--build-arg BUILD_IMAGE=${BUILD_IMAGE_FULL} \
--build-arg BASE_IMAGE=docker.io/library/alpine:3.11.2 \
--build-arg BUILD_IMAGE=docker.io/volkerraschek/build-image:latest \
--build-arg EXECUTABLE=${EXECUTABLE} \
--build-arg EXECUTABLE_TARGET=bin/linux/amd64/${EXECUTABLE} \
--build-arg GOPROXY=${GOPROXY} \
@ -134,16 +107,16 @@ container-image/build/amd64:
--build-arg VERSION=${VERSION} \
--file Dockerfile \
--no-cache \
--tag ${CONTAINER_IMAGE_FULL} \
--tag ${CONTAINER_IMAGE_SHORT} \
--tag docker.io/volkerraschek/flucky:${CONTAINER_IMAGE_VERSION} \
--tag volkerraschek/flucky:${CONTAINER_IMAGE_VERSION} \
.
PHONY+=container-image/push/amd64
container-image/push/amd64: container-image/build/amd64
${CONTAINER_RUNTIME} login ${CONTAINER_IMAGE_REGISTRY} \
${CONTAINER_RUNTIME} login docker.io \
--username ${CONTAINER_IMAGE_REGISTRY_USER} \
--password ${CONTAINER_IMAGE_REGISTRY_PASSWORD}
${CONTAINER_RUNTIME} push ${CONTAINER_IMAGE_FULL}
${CONTAINER_RUNTIME} push docker.io/volkerraschek/flucky:${CONTAINER_IMAGE_VERSION}
# CONTAINER STEPS - BINARY
# ==============================================================================
@ -186,12 +159,11 @@ container-run:
${CONTAINER_RUNTIME} run \
--rm \
--volume ${PWD}:/workspace \
${BUILD_IMAGE_FULL} \
docker.io/volkerraschek/build-image:latest \
make ${COMMAND} \
GOPROXY=${GOPROXY} \
GOPRIVATE=${GOPRIVATE} \
VERSION=${VERSION:v%=%} \
RELEASE=${RELEASE}
VERSION=${VERSION:v%=%}
# REMOTE
# ==============================================================================