diff --git a/build_and_push_docker_images.sh b/build_and_push_docker_images.sh index 6d930411e..cc1e40d3b 100755 --- a/build_and_push_docker_images.sh +++ b/build_and_push_docker_images.sh @@ -18,6 +18,7 @@ dockerfiles/theia-dev dockerfiles/theia dockerfiles/theia-endpoint-runtime dockerfiles/remote-plugin-runner-java8 +dockerfiles/remote-plugin-go-1.10.7 ) IMAGES_LIST=( @@ -25,21 +26,21 @@ eclipse/che-theia-dev eclipse/che-theia eclipse/che-theia-endpoint-runtime eclipse/che-remote-plugin-runner-java8 +eclipse/che-remote-plugin-go-1.10.7 ) # BUILD IMAGES for image_dir in "${DOCKER_FILES_LOCATIONS[@]}" do + GITHUB_TOKEN_ARG="GITHUB_TOKEN="${GITHUB_TOKEN} if [ "$image_dir" == "dockerfiles/theia" ]; then THEIA_IMAGE_TAG="master" - bash $(pwd)/$image_dir/build.sh --build-args:GITHUB_TOKEN=${GITHUB_TOKEN},THEIA_VERSION=master --tag:master --branch:master --git-ref:refs\\/heads\\/master + bash $(pwd)/$image_dir/build.sh --build-args:${GITHUB_TOKEN_ARG},THEIA_VERSION=master --tag:master --branch:master --git-ref:refs\\/heads\\/master elif [ "$image_dir" == "dockerfiles/theia-dev" ]; then - bash $(pwd)/$image_dir/build.sh --build-arg:GITHUB_TOKEN=${GITHUB_TOKEN} --tag:master - elif [ "$image_dir" == "dockerfiles/theia-endpoint-runtime" ]; then - bash $(pwd)/$image_dir/build.sh --build-arg:GITHUB_TOKEN=${GITHUB_TOKEN} + bash $(pwd)/$image_dir/build.sh --build-arg:${GITHUB_TOKEN_ARG} --tag:master else - bash $(pwd)/$image_dir/build.sh + bash $(pwd)/$image_dir/build.sh --build-arg:${GITHUB_TOKEN_ARG} fi if [ $? -ne 0 ]; then echo "ERROR:" diff --git a/dockerfiles/remote-plugin-go-1.10.7/Dockerfile b/dockerfiles/remote-plugin-go-1.10.7/Dockerfile new file mode 100644 index 000000000..96dd1a52f --- /dev/null +++ b/dockerfiles/remote-plugin-go-1.10.7/Dockerfile @@ -0,0 +1,74 @@ +# Copyright (c) 2019 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + +FROM eclipse/che-theia-endpoint-runtime:nightly + +RUN set -eux; \ + apk add --no-cache --virtual .build-deps \ + bash \ + gcc \ + musl-dev \ + openssl \ + go \ + git \ + ; \ + export \ + GOROOT_BOOTSTRAP="$(go env GOROOT)" \ + GOOS="$(go env GOOS)" \ + GOARCH="$(go env GOARCH)" \ + GOHOSTOS="$(go env GOHOSTOS)" \ + GOHOSTARCH="$(go env GOHOSTARCH)" \ + ; \ + apkArch="$(apk --print-arch)"; \ + case "$apkArch" in \ + armhf) export GOARM='6' ;; \ + x86) export GO386='387' ;; \ + esac; \ + \ + wget -qO- https://dl.google.com/go/go1.10.7.linux-amd64.tar.gz | tar xvz -C /usr/local; \ + \ + cd /usr/local/go/src; \ + ./make.bash; \ + \ + rm -rf \ + /usr/local/go/pkg/bootstrap \ + /usr/local/go/pkg/obj \ + ; \ + export GOPATH="/go"; \ + mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"; \ + export PATH="$GOPATH/bin:/usr/local/go/bin:$PATH"; \ + go get -u -v github.com/ramya-rao-a/go-outline && \ + go get -u -v github.com/acroca/go-symbols && \ + go get -u -v github.com/mdempsky/gocode && \ + go get -u -v github.com/rogpeppe/godef && \ + go get -u -v golang.org/x/tools/cmd/godoc && \ + go get -u -v github.com/zmb3/gogetdoc && \ + go get -u -v golang.org/x/lint/golint && \ + go get -u -v github.com/fatih/gomodifytags && \ + go get -u -v golang.org/x/tools/cmd/gorename && \ + go get -u -v sourcegraph.com/sqs/goreturns && \ + go get -u -v golang.org/x/tools/cmd/goimports && \ + go get -u -v github.com/cweill/gotests/... && \ + go get -u -v golang.org/x/tools/cmd/guru && \ + go get -u -v github.com/josharian/impl && \ + go get -u -v github.com/haya14busa/goplay/cmd/goplay && \ + go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs && \ + go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct && \ + go get -u -v github.com/alecthomas/gometalinter && \ + go get -u -v github.com/go-delve/delve/cmd/dlv && \ + gometalinter --install \ + ; \ + apk del .build-deps \ + ; \ + go version + +ENV GOPATH /go +ENV GOROOT /usr/local/go +ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH diff --git a/dockerfiles/remote-plugin-go-1.10.7/build.sh b/dockerfiles/remote-plugin-go-1.10.7/build.sh new file mode 100644 index 000000000..9476a0bfd --- /dev/null +++ b/dockerfiles/remote-plugin-go-1.10.7/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Copyright (c) 2019 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +base_dir=$(cd "$(dirname "$0")"; pwd) +. "${base_dir}"/../build.include + +init --name:remote-plugin-go-1.10.7 "$@" +build