Compare commits

..

2 commits

Author SHA1 Message Date
Marek Skalický
1d434f7933
Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00
Jakub Čajka
9904e2eaec Initial go 1.11 commit 2018-09-14 15:07:11 +02:00
5 changed files with 22 additions and 8 deletions

View file

View file

@ -1,7 +1,7 @@
FROM registry.fedoraproject.org/f27/s2i-base:latest
FROM registry.fedoraproject.org/f30/s2i-base:latest
ENV NAME=golang \
VERSION=1.9 \
VERSION=1.11 \
ARCH=x86_64
ENV SUMMARY="Platform for building and running Go $VERSION based applications" \

View file

@ -20,11 +20,14 @@ if [[ `go list -f {{.Incomplete}}` == "true" || ! -z "$IMPORT_URL" ]]; then
mv /tmp/src/* $GOPATH/src/$IMPORT_URL
if [[ -d /tmp/artifacts/pkg ]]; then
if [[ -d /tmp/artifacts/pkg || -d /tmp/artifacts/go-build ]]; then
echo "Restoring previous build artifacts"
mv /tmp/artifacts/pkg $GOPATH
GOCACHE=`go env GOCACHE`
mkdir -p $GOCACHE
mv /tmp/artifacts/go-build $GOCACHE
fi

View file

@ -2,13 +2,24 @@
set -e
TOSAVE=""
if [[ -d $HOME/go/pkg ]]; then
pushd $HOME/go &> /dev/null
tar -cf - pkg
popd &> /dev/null
mv $HOME/go/pkg pkg &> /dev/null
TOSAVE=$TOSAVE"./pkg "
fi
if [[ -d `go env GOCACHE` ]]; then
mv `go env GOCACHE` go-build &> /dev/null
TOSAVE=$TOSAVE"./go-build "
fi
if [[ -n "$TOSAVE" ]]; then
tar -cf - $TOSAVE
fi

View file

@ -5,10 +5,10 @@ NAMESPACE=centos
[[ $DISTRO =~ rhel* ]] && NAMESPACE=rhscl
cat <<EOF
This is a S2I golang-1.9 ${DISTRO} base image:
This is a S2I golang-1.11 ${DISTRO} base image:
To use it, install S2I: https://github.com/openshift/source-to-image
Sample invocation:
s2i build -e IMPORT_URL='github.com/cpuguy83/go-md2man' git://github.com/cpuguy83/go-md2man ${NAMESPACE}/golang-1.9-${DISTRO} go-sample-app
s2i build -e IMPORT_URL='github.com/cpuguy83/go-md2man' git://github.com/cpuguy83/go-md2man ${NAMESPACE}/golang-1.11-${DISTRO} go-sample-app
You can then run the resulting image via:
docker run go-sample-app
EOF