Skip to content

Commit

Permalink
commencing gargantuan commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Braekman committed Jun 18, 2019
0 parents commit 0f6b1dc
Show file tree
Hide file tree
Showing 11,206 changed files with 3,222,277 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
204 changes: 204 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
version: 2

defaults: &defaults
working_directory: /go/src/github.com/weaveworks/scope
docker:
- image: weaveworks/scope-backend-build:master-fda40b83

client-defaults: &client-defaults
working_directory: /home/weave/scope
docker:
- image: weaveworks/scope-ui-build:master-c0b60a16

workflows:
version: 2
test_and_deploy:
jobs:
- lint
- unit-test
- client-build
- client-test:
requires:
- client-build
- xplatform-build:
requires:
- build
- build:
requires:
- client-build
- integration-tests:
requires:
- lint
- unit-test
- build
- deploy:
filters:
branches:
only: master
requires:
- client-test
- integration-tests

jobs:
lint:
<<: *defaults
steps:
- checkout
- run: make BUILD_IN_CONTAINER=false lint

unit-test:
<<: *defaults
parallelism: 1
steps:
- checkout
- run: COVERDIR=./coverage make BUILD_IN_CONTAINER=false CODECGEN_UID=23 tests
- persist_to_workspace:
root: .
paths:
- coverage

# Create client/build/index.html
client-build:
<<: *client-defaults
steps:
- checkout
- restore_cache:
name: Restoring Yarn Cache
key: yarn-cache-2-{{ checksum "client/yarn.lock" }}
- restore_cache:
name: Restoring client/node_modules
key: node-modules-{{ checksum "client/yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- run: cd client; yarn install
- save_cache:
name: Saving Yarn Cache
key: yarn-cache-2-{{ checksum "client/yarn.lock" }}
paths:
- "/home/weave/scope/.cache/yarn"
- save_cache:
name: Saving client/node_modules
# include the CI config in the checksum because it will change when the docker image changes
key: node-modules-{{ checksum "client/yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
paths:
- "/home/weave/scope/client/node_modules"
- run: |
cd client
yarn run build
yarn run build-external
yarn run bundle
- persist_to_workspace:
root: /home/weave/scope
paths:
- client/build/
- client/build-external/
- client/bundle/weave-scope.tgz


client-test:
<<: *client-defaults
steps:
- checkout
- restore_cache:
name: Restoring Yarn Cache
key: yarn-cache-2-{{ checksum "client/yarn.lock" }}
- restore_cache:
name: Restoring client/node_modules
key: node-modules-{{ checksum "client/yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- run: |
cd client
yarn install
yarn run lint
yarn test
xplatform-build:
<<: *defaults
steps:
- checkout
- run: GOARCH=arm make BUILD_IN_CONTAINER=false GO_BUILD_INSTALL_DEPS= prog/scope
- run: GOOS=darwin make BUILD_IN_CONTAINER=false GO_BUILD_INSTALL_DEPS= prog/scope

build:
<<: *defaults
steps:
- checkout
- setup_remote_docker
- attach_workspace:
at: .
- run: make BUILD_IN_CONTAINER=false SUDO= static all
- run: cd extras; make BUILD_IN_CONTAINER=false
- run: make -C tools/runner
- persist_to_workspace:
root: .
paths:
- scope.tar
- cloud-agent.tar
- tools/runner/runner
- prog/externalui/
- prog/staticui/
- report/report.codecgen.go
- render/detailed/detailed.codecgen.go

integration-tests:
machine:
image: circleci/classic:201709-01
working_directory: /home/circleci/src/github.com/weaveworks/scope
environment:
CIRCLE_ARTIFACTS: /tmp/artifacts
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
GOPATH: /home/circleci/
parallelism: 2
steps:
- checkout
- attach_workspace:
at: .
- run: |
sudo apt-get update
sudo apt-get install python-pip jq pv
- run: mkdir $CIRCLE_ARTIFACTS
# kick off creation of test VMs
- run: test -z "$SECRET_PASSWORD" || bin/setup-circleci-secrets "$SECRET_PASSWORD"
- run: test -z "$SECRET_PASSWORD" || (cd integration; ./gce.sh make_template)
- run: test -z "$SECRET_PASSWORD" || (cd integration; ./gce.sh setup && eval $(./gce.sh hosts); ./setup.sh)
- run: make deps; touch tools/runner/runner
# Run all integration tests
- run:
command: test -z "$SECRET_PASSWORD" || (cd integration; eval $(./gce.sh hosts); ./run_all.sh)
no_output_timeout: 5m
# Destroy testing VMs:
- run:
command: test -z "$SECRET_PASSWORD" || (cd integration; ./gce.sh destroy)
background: true
# Code coverage
- run: ./tools/cover/gather_coverage.sh ./coverage
- run: goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=profile.cov -service=circleci
- run: cp coverage.* */*.codecgen.go $CIRCLE_ARTIFACTS
- store_artifacts:
path: /tmp/artifacts

deploy:
<<: *defaults
environment:
IMAGES: scope cloud-agent
steps:
- checkout
- setup_remote_docker
- attach_workspace:
at: .
- run: |
pip install awscli
docker load -i scope.tar
docker load -i cloud-agent.tar
- run: |
test -z "${DOCKER_USER}" && exit 0
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
for IMAGE in $IMAGES; do
test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" = "weaveworks" || docker tag weaveworks/$IMAGE:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/$IMAGE:latest
docker tag weaveworks/$IMAGE:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/$IMAGE:$(./tools/image-tag)
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/$IMAGE:latest
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/$IMAGE:$(./tools/image-tag)
done
- run: |
test -z "${QUAY_USER}" && exit 0
docker login -e '.' -u "$QUAY_USER" -p "$QUAY_PASSWORD" quay.io
docker tag weaveworks/scope:$(./tools/image-tag) "quay.io/${QUAY_ORGANIZATION}/scope:$(./tools/image-tag)"
docker push "quay.io/${QUAY_ORGANIZATION}/scope:$(./tools/image-tag)"
- run: test -z "${UI_BUCKET_KEY_ID}" || (make BUILD_IN_CONTAINER=false ui-upload ui-pkg-upload)
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!--
Hi, thank you for opening an issue!
Before hitting the button...
** Is this a REQUEST FOR HELP? **
If so, please have a look at:
- How WeaveScope works : https://www.weave.works/docs/scope/latest/how-it-works/
- our troubleshooting page: https://www.weave.works/docs/scope/latest/building/
- our help page, to choose the best channel (Slack, etc.) to reach out: https://weave-community.slack.com/messages/scope/
** Is this a FEATURE REQUEST? **
If so, please search existing feature requests, and if you find a similar one, up-vote it and/or add your comments to it instead.
If you did not find a similar one, please describe in details:
- why: your use-case, specific constraints you may have, etc.
- what: the feature/behaviour/change you would like to see in Weave Scope
Do not hesitate, when appropriate, to share the exact commands or API you would like, and/or to share a diagram (e.g.: asciiflow.com): "a picture is worth a thousand words".
** Is this a BUG REPORT? **
Please fill in as much of the template below as you can.
Thank you!
-->

## What you expected to happen?

## What happened?
<!-- Error message, actual behaviour, etc. -->

## How to reproduce it?
<!-- Specific steps, as minimally and precisely as possible. -->

## Anything else we need to know?
<!-- Cloud provider? Hardware? How did you configure your cluster? Kubernetes YAML, KOPS, etc. -->

## Versions:
<!-- Please paste in the output of these commands; 'kubectl' only if using Kubernetes -->
```
$ scope version
$ docker version
$ uname -a
$ kubectl version
```

## Logs:
```
$ docker logs weavescope
```
or, if using Kubernetes:
```
$ kubectl logs <weave-scope-pod> -n <namespace>
```
<!-- (If output is long, please consider a Gist.) -->
<!-- Anything interesting or unusual output by the below, potentially relevant, commands?
$ journalctl -u docker.service --no-pager
$ journalctl -u kubelet --no-pager
$ kubectl get events
-->

69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test
.vagrant
releases
tmp
.cache

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
.DS_Store

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof
profile.cov
coverage.html

# Emacs backup files
*~

# ctags files
tags

# Project specific
.*.uptodate
.uptodate
scope.tar
cloud-agent.tar
.pkg
prog/scope
docker/scope
docker/docker.tgz
docker/docker
docker/weave
docker/weaveutil
docker/runsvinit
extras/fixprobe/fixprobe
extras/fixprobe/*.json
extras/copyreport/copyreport
*sublime-project
*sublime-workspace
*npm-debug.log
*yarn-error.log
app/static.go
vendor/github.com/ugorji/go/codec/codecgen/bin/*
*.codecgen.go
client/build-external/*
prog/staticui/*
prog/externalui/*
client/build-pkg
client/bundle

# Website
site-build
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.0
Loading

0 comments on commit 0f6b1dc

Please sign in to comment.