Skip to content

Commit 43a8a37

Browse files
authored
Merge pull request #173 from contiv/master
Merge master into release-1.2 branch
2 parents 0374e5d + 5d0e1a3 commit 43a8a37

File tree

996 files changed

+240026
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

996 files changed

+240026
-49
lines changed

.dockerignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
.git
2-
31
# don't import anything from the UI except the /app folder where the
42
# actual site and compiled assets live.
5-
build/dependencies/contiv-ui
6-
!build/dependencies/contiv-ui/app
3+
ui
4+
!ui/app

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@ local_certs
88
# state info stored for a local etcd instance
99
state/default.etcd/
1010

11-
# build dependencies (e.g., UI, etc.)
12-
build/dependencies
13-
1411
# logs
1512
*.log

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM golang:1.7.6 as builder
2+
3+
COPY ./ /go/src/github.com/contiv/auth_proxy
4+
5+
WORKDIR /go/src/github.com/contiv/auth_proxy
6+
7+
RUN VERSION=$(git describe --tags --always) ./scripts/build_in_container.sh
8+
9+
FROM scratch
10+
11+
COPY ./ui/app /ui
12+
COPY --from=builder /go/src/github.com/contiv/auth_proxy/build/output/auth_proxy /auth_proxy
13+
14+
WORKDIR /
15+
16+
ENTRYPOINT ["./auth_proxy"]

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ godep:
3838
run:
3939
docker-compose up -d
4040

41+
# shfmt formats all shell scripts in a standardized way
42+
shfmt:
43+
go get github.com/contiv-experimental/sh/cmd/shfmt || :
44+
find . -type f -name "*.sh" -and -not -path "./vendor/*" -print0 | xargs -0 shfmt -w
45+
4146
# systemtests runs the system tests suite.
4247
systemtests: generate-certificate
4348
@bash ./scripts/systemtests.sh

build/Dockerfile.checks

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ RUN go get github.com/golang/lint/golint
55
RUN go get github.com/fzipp/gocyclo
66
RUN go get github.com/client9/misspell/...
77
RUN go get github.com/remyoudompheng/go-misc/deadcode/...
8-
RUN go get github.com/contiv-experimental/sh/cmd/shfmt
98

109
COPY ./ /go/src/github.com/contiv/auth_proxy
1110

build/Dockerfile.release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM scratch
22

3-
COPY ./build/dependencies/contiv-ui/app /ui
3+
COPY ./ui/app /ui
44
COPY ./build/output/auth_proxy /auth_proxy
55

66
WORKDIR /

scripts/build.sh

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,6 @@ IMAGE_NAME="contiv/auth_proxy"
77
BUILD_IMAGE_NAME="${IMAGE_NAME}_build"
88
VERSION=${BUILD_VERSION-$DEV_IMAGE_NAME}
99

10-
#
11-
# bake in the UI assets
12-
#
13-
UI_DIR="$PWD/build/dependencies/contiv-ui"
14-
15-
mkdir -p $UI_DIR
16-
17-
# make sure we have a local checkout
18-
echo "Checking to see if $UI_DIR/.git exists"
19-
20-
if [ ! -d "$UI_DIR/.git" ]; then
21-
echo "contiv-ui dependency directory does not exist, creating..."
22-
echo "Performing clone of contiv-ui repo into $UI_DIR"
23-
git clone --depth 1 https://github.com/contiv/contiv-ui.git $UI_DIR
24-
fi
25-
26-
pushd $UI_DIR
27-
28-
# this is a fancy way to check if the var is set without tripping the unbound variable check
29-
if [ ! -z "${BUILD_VERSION-}" ]; then
30-
echo "BUILD_VERSION is set ($BUILD_VERSION), checking it out as a tag..."
31-
32-
git checkout master # make sure we have the latest master + all tags
33-
git pull --ff-only # no merge commits, please
34-
git fetch --tags # shallow clones do not include tags, so doublecheck
35-
git checkout $BUILD_VERSION # BUILD_VERSION is expected to be a valid tag
36-
else
37-
echo "No BUILD_VERSION set, skipping checkout/update of contiv-ui repo"
38-
echo "Whatever version is currently checked out in $UI_DIR directory will be baked in"
39-
echo "Current version: $(git rev-parse HEAD)"
40-
fi
41-
42-
#
43-
# build the final image
44-
#
45-
popd
46-
4710
# create a local build image
4811
docker build -t $BUILD_IMAGE_NAME -f ./build/Dockerfile.build .
4912

scripts/checks_in_container.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ set -e
44

55
export PATH="/go/bin:$PATH"
66

7-
echo "Formatting all shell scripts..."
8-
find . -type f -name "*.sh" -and -not -path "./vendor/*" -and -not -path "./build/dependencies/*" -print0 | xargs -0 shfmt -w
9-
107
dirs=$(go list ./... | sed -e 's!github.com/contiv/auth_proxy!.!g' | grep -v ./vendor)
118
files=$(find . -type f -name '*.go' | grep -v ./vendor)
129

ui/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

ui/.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "app/bower_components"
3+
}

ui/.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
app/*.js
2+
app/*.ts
3+
app/*/*.js
4+
app/*/*.ts
5+
app/bower_components/**
6+
app/*/*/*.js
7+
app/*/*/*.ts
8+
app/*/*/*/*.js
9+
app/*/*/*/*.ts
10+
!app/bower_components/semantic-ui/dist/**
11+
!app/bower_components/jquery/dist/**
12+
!app/main.bundle.js
13+
!app/vendor.bundle.js
14+
!app/polyfills.bundle.js

ui/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
app/bower_components/jquery
3+
.idea
4+
app/**/*.map
5+
app/**/*.js
6+
**/.DS_Store

ui/.jshintrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"globalstrict": true,
3+
"globals": {
4+
"angular": false,
5+
"describe": false,
6+
"it": false,
7+
"expect": false,
8+
"beforeEach": false,
9+
"afterEach": false,
10+
"module": false,
11+
"inject": false
12+
}
13+
}

ui/.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
5+
before_script:
6+
- export DISPLAY=:99.0
7+
- sh -e /etc/init.d/xvfb start
8+
- npm start > /dev/null &
9+
- npm run update-webdriver
10+
- sleep 1 # give server time to start
11+
12+
script:
13+
- node_modules/.bin/karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
14+
- node_modules/.bin/protractor e2e-tests/protractor.conf.js --browser=firefox

0 commit comments

Comments
 (0)