-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
general: remove import paths and sort out CI (#36)
- Loading branch information
Showing
79 changed files
with
404 additions
and
555 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source "$(git rev-parse --show-toplevel)/_scripts/commonFunctions.bash" | ||
|
||
autostash_or_export DOCKER_IMAGE="x_monorepo" | ||
autostash_or_export DOCKERFILE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
autostash_or_export DOCKER_WORKING_DIR="$HOME/gopath/src/myitcv.io" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
GH_USER | ||
GH_TOKEN | ||
GO_VERSION | ||
CHROMEDRIVER_VERSION | ||
CHROME_CHANNEL | ||
TRAVIS |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/.bin | ||
_scripts/.vbash* |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM ubuntu:18.04 | ||
|
||
RUN apt-get -qq update | ||
RUN apt-get -qq -y install sudo apt-utils git curl jq unzip gnupg2 | ||
|
||
RUN export go_bootstrap="$(curl -s https://golang.org/dl/?mode=json | jq -r '.[0] .version')" && \ | ||
curl -sL https://dl.google.com/go/$go_bootstrap.linux-amd64.tar.gz | tar -C / -zx | ||
|
||
ENV PATH=/go/bin:$PATH | ||
|
||
RUN git clone -q https://github.com/myitcv/vbash /vbash/src/github.com/myitcv/vbash && \ | ||
export GOPATH=/vbash && \ | ||
go install github.com/myitcv/vbash | ||
|
||
ARG USER | ||
ARG UID | ||
ARG DOCKER_WORKING_DIR | ||
ARG CHROME_CHANNEL | ||
|
||
RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \ | ||
curl -sL https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - && \ | ||
apt-get -qq update && \ | ||
apt-get -qq -y install google-chrome-${CHROME_CHANNEL} | ||
|
||
ENV PATH=/vbash/bin:$PATH | ||
ENV GOPATH=/home/$USER/gopath | ||
|
||
RUN groupadd -g $UID $USER && \ | ||
adduser --uid $UID --gid $UID --disabled-password --gecos "" $USER | ||
|
||
RUN sudo -u $USER mkdir -p $DOCKER_WORKING_DIR | ||
|
||
# enable sudo | ||
RUN usermod -aG sudo $USER | ||
RUN echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER | ||
|
||
USER $USER |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env vbash | ||
|
||
# Copyright (c) 2016 Paul Jolly <paul@myitcv.org.uk>, all rights reserved. | ||
# Use of this document is governed by a license found in the LICENSE document. | ||
|
||
source "$(git rev-parse --show-toplevel)/_scripts/common.bash" | ||
|
||
# we just generate and test in this template module | ||
$gg ./... | ||
go test ./... | ||
./_scripts/install_go.sh | ||
./_scripts/setupCIEnv.sh | ||
./_scripts/run_tests.sh | ||
./_scripts/check_code_is_formatted.sh | ||
./_scripts/check_git_is_clean.sh |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env vbash | ||
|
||
source "${BASH_SOURCE%/*}/common.bash" | ||
source "$(git rev-parse --show-toplevel)/_scripts/common.bash" | ||
|
||
trap "go version" EXIT | ||
|
||
if [ "${USE_GO_TIP:-}" != "true" ] | ||
only_run_on_ci_server | ||
|
||
if [ "$(uname -m)" != "x86_64" ] | ||
then | ||
# nothing to do | ||
exit | ||
echo "Unkown architecture" | ||
exit 1 | ||
fi | ||
|
||
source="https://github.com/myitcv/gobuilds/raw/master/linux_amd64/$GO_TIP_VERSION.tar.gz" | ||
target=$HOME/gotip | ||
os=$(uname | tr '[:upper:]' '[:lower:]') | ||
arch="amd64" | ||
|
||
if [[ "$GO_VERSION" = go* ]] | ||
then | ||
cd $HOME | ||
curl -sL https://dl.google.com/go/$GO_VERSION.${os}-${arch}.tar.gz | tar -zx | ||
else | ||
# tip | ||
source="https://github.com/myitcv/gobuilds/raw/master/${os}_${arch}/$GO_VERSION.tar.gz" | ||
target=$HOME/go | ||
|
||
echo "Will install ${GO_TIP_VERSION:0:10} from $source to $target" | ||
echo "Will install ${GO_VERSION:0:10} from $source to $target" | ||
|
||
mkdir -p $target | ||
cd $target | ||
mkdir -p $target | ||
cd $target | ||
|
||
curl -L -s $source | tar -xz | ||
curl -L -s $source | tar -xz | ||
fi |
Oops, something went wrong.