Commit Graph

213 Commits

Author SHA1 Message Date
srajmane
2bb7fbc13b Update Makefile 2021-05-20 17:46:11 +05:30
Bryan Boreham
85770038a2 Run AWS CLI from a container image
So we don't have to install it, or Python.
Need to run in 'machine' executor on CircleCI so we can mount
volumes into the Docker command.
2021-04-07 10:12:45 +00:00
Bryan Boreham
1da160f671 Update Weave Net dependency to 2.8.1
2.1.3 is very old, and seems to be failing the build
2021-04-04 14:14:11 +01:00
Bryan Boreham
1cd32cd3ac Add 'osusergo' tag
Avoids warnings like "Using 'getgrouplist' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking"
2021-04-04 13:45:05 +01:00
Bryan Boreham
b321f1c1e3 Simplify Go cross-compile settings
We only want to force CGO_ENABLED when cross-compiling for arm;
it is on by default for native linux compilation and off by default
for darwin cross-compilation.
2021-04-04 13:45:05 +01:00
Bryan Boreham
0d0ccd989b Remove 'demo.json' file, not used in Scope 2021-04-04 13:45:05 +01:00
Bryan Boreham
825a278ea5 Move codecgen exe inside build_in_container
It calls 'go', which may not be present outside the build container
2021-04-04 13:45:05 +01:00
Bryan Boreham
3c4adb6ed8 Remove unused 'deps' tools
gvt replaced by Go modules; github-release not used in CI
2021-04-04 13:45:05 +01:00
Bryan Boreham
c2578b6fb7 Move 'esc' tool out of image into vendor'd source
Smaller that way, and more consistent

(Note we run it with GC enabled; it crashes in CI otherwise)
2021-04-04 13:45:05 +01:00
Bryan Boreham
29b954d0cb Stop creating a NodeJS build image
All it does is set some environment variables so just set those on the command-line
2021-04-04 11:16:13 +01:00
Bryan Boreham
440892516f Set HOME for build containers
Otherwise it's blank on Apple M1 platform (at least) and builds fail

Now we have to git-ignore .yarnrc file, which is created in the HOME dir.
2021-04-04 11:16:13 +01:00
Bryan Boreham
894f35e52a Mount Go build cache from host
This speeds up subsequent compilations
2021-04-04 11:16:13 +01:00
Bryan Boreham
4a670856e5 Tell Docker to optimise build mounts
'delegated' says the container side is in charge, and Docker doesn't have to work hard to keep the host in sync

'z' is needed for SELinux
2021-04-04 11:16:13 +01:00
Bryan Boreham
d1129c41ae Refactor Makefile: extract repeated docker command
The command and arguments for yarn runs was repeated many times.
2021-04-04 11:16:13 +01:00
Bryan Boreham
833f947fb3 Run Go build as current user via -u flag
Remove complicated workaround in build.sh
2021-04-04 11:16:13 +01:00
Bryan Boreham
7243af71c7 Create embedded Go files before linting
Otherwise we get a compile error
2020-12-30 18:30:34 +00:00
Daniel Holbach
1ab610ca78 .. 2020-09-03 10:16:04 +02:00
Daniel Holbach
b64ac919f7 shellcheck version? 2020-09-03 10:15:02 +02:00
Daniel Holbach
c9b44d7c93 use supported releases 2020-09-03 10:15:02 +02:00
Bryan Boreham
15bb96bb67 Remove outdated instructions about rebuilding Go libraries
This bit is unnecessary with newer versions of Go that cache builds
for different tags in different places.
2020-01-14 13:22:33 +00:00
Bryan Boreham
bc4ec26bf5 Turn off module use for codecgen build
There is no way to pass `-mod=vendor` through to the Go compilation
that codecgen runs.
2020-01-14 12:33:49 +00:00
Bryan Boreham
aae86877c7 Add back runsvint dependency
This is a small program used to watch app and probe running inside
the container.  We need to go round a few houses to be able to build
it from vendor directory.
2020-01-14 12:29:31 +00:00
Bryan Boreham
3a991eca99 build: use vendored files when building 2020-01-13 17:29:07 +00:00
Bryan Boreham
3357551619 build: don't need -i flag
This was useful to cache dependent library builds, but Go does that
better now so we don't need the flag.
2020-01-13 17:28:18 +00:00
Shovan Maity
95b231727e update build to run as current user
pass user and group id in docker run command to run it as current user

Signed-off-by: Shovan Maity <shovan.cse91@gmail.com>
2019-10-14 17:01:59 +05:30
Bryan Boreham
9e62dac37d build: don't lint tools shellscripts in Scope CI
It's now run in the CI for the upstream repo weaveworks/build-tools.
2019-10-02 14:34:44 +00:00
Daniel Holbach
3ceb987608 Fix bind-mount volume path "client/client"
yarn will otherwise complain about missing client/package.json
	in "make client-test"

Signed-off-by: Daniel Holbach <daniel@weave.works>
2019-01-15 09:29:09 +05:30
Marcus Cobden
4dd6f4cd2b Create UI toolchain dirs from Makefile
To prevent docker from creating it with root as the owner
2018-10-11 11:07:19 +01:00
Marcus Cobden
041ebed8a3 Fix path confusion in bundle building 2018-09-26 12:16:49 +01:00
Marcus Cobden
3a0dc3c34f Fix CI by removing Dockerfile workdir 2018-09-26 10:41:31 +01:00
Marcus Cobden
aafab27c74 Add Makefile target for UI build toolchain 2018-09-26 10:41:31 +01:00
Marcus Cobden
c03e6a0e50 Rework UI build to improve caching and fix packaging issue
Stop baking the toolchain and dependencies into the build image.
Instead, run the install step each time, but use volume mounts or
CircleCI caching to keep the happy path fast.

Previously, some parts of the client (UI) directory were baked into the build
image, and some parts were mounted or copied into the build environment.
As a result, files baked into the build image require a two-step
update for changes to take effect in CI.

Now, for dockerised builds, we pre-install very little into the build
image and mount the whole directory into the build environment.
However, we do overlay a volume on the node_modules folder to allow the
standard build toolchain to be separate from the host build toolchain.

Non-dockerised builds (e.g. CI) are now more similar to the dockerised
versions.
2018-09-26 10:41:30 +01:00
Bryan Boreham
ebfed1bc83 Don't insist the build container is up-to-date when BUILD_IN_CONTAINER=false
Why do you care?  You're either inside it or not using it.
2018-08-30 10:13:42 +00:00
Bryan Boreham
ec49a38b83 Tag build images with git hash 2018-08-30 10:13:41 +00:00
Lili Cosic
31d68c44a2 Add make target to generate CRI files
The cri make target generates the api.pb.go files by first fetching the
latest proto files from upstream and uses protoc to generate them.
2018-07-26 10:51:53 +01:00
Marc Carré
4e58b83024 Add org.opencontainers.image.* labels to Dockerfiles
- This should ultimately help for image-to-code back references.
- `org.label-schema.*` labels are now deprecated, in favour of `org.opencontainers.image.*` labels.
  See also: https://github.com/opencontainers/image-spec/blob/master/annotations.md#back-compatibility-with-label-schema
- Git revision (`git rev-parse HEAD`) is now injected at `docker build` time.
2018-05-14 11:54:33 +01:00
Matthias Radestock
5a6a6dfd58 remove from cruft from Makefile
This was left over from #1345.
2017-12-27 16:34:00 +00:00
Matthias Radestock
efbfd5d582 don't embed docker binary
We needed it because some of our invocations of Weave Net's `weave`
script depended on it, but that is no longer the case as of Weave Net
2.1.

Fixes #2974.
2017-12-11 17:02:20 +00:00
Matthias Radestock
c6455c41a0 bump embedded Weave Net version to 2.1.3 2017-12-11 11:33:17 +00:00
Matthias Radestock
2cd8b3388f add 'realclean' make target to clear out container images
...and use that in bin/release, so that we don't build releases with
ancient images.
2017-07-30 07:16:39 +01:00
Bryan Boreham
3c16c416a5 Merge pull request #2618 from weaveworks/unit-test-tags
Pass build tags to unit tests
2017-07-22 09:45:35 -07:00
Roland Schilter
ce728d2b79 Allows to skip client build when doing make prog/scope (#2732)
When you run the client locally with `yarn start` and modify the
app/probe code you don't want to compile the client on `make prog/scope`.

This allows you to do `SCOPE_SKIP_UI_ASSETS=true make prog/scope` to
only build the scope binary.
2017-07-21 19:10:18 +02:00
Bryan Boreham
d8278ec8ae Pass all Go build tags to tests 2017-07-13 16:08:03 +00:00
Roland Schilter
718e817c73 Update README/Makefile/package.json to use yarn
Fixes #2606
2017-07-04 14:50:53 +02:00
Roland Schilter
b78745f615 Execute tests in the prog/ directory (#2567)
Also fixed prog/main_test.go (which has never been part of the test suite so far)
2017-06-08 15:41:53 +02:00
Roland Schilter
1c4f0036cf Fix incomplete dependencies for make scope/prog
It seems that on my OS the passed param to find gets expanded early and
thus the command

    $(shell find ./ -path ./vendor -prune -o -type f -name *.go)

results in

        ./test.go ./vendor

instead of including all the go files from subdirs. Quoting helps.
2017-06-05 15:56:16 +01:00
Ilya Dmitrichenko
05f6a9b217 Add website preview via Netlify 2017-04-27 13:52:57 +01:00
Alfonso Acosta
70cd3aaba0 only lint files in git ls-files, not .git/* 2017-04-26 16:43:06 +00:00
Jordan Pellizzari
6608b79c17 Added Scope version to S3 module path 2017-03-25 10:49:40 -07:00
Bryan Boreham
97dda9454d Fix mismatched code coverage errors
'codecgen' embeds a random integer in each identifier; this means code
coverage across different CircleCI lanes may not match.
Here we force the integer to 23 on every CircleCI build so they always match.
2017-03-23 13:31:38 +00:00