Commit Graph

15 Commits

Author SHA1 Message Date
Dave Try
321e0e9d01
ci: enable bazel builds for docker images (#51241)
Reintroduces the same changes as
https://github.com/sourcegraph/sourcegraph/pull/51104 minus
syntax-highlighter which we're unable to compile with the right
toolchain at the moment.

Tested as a full main-dry-run, as well as running the stack with compose
and checking indexing and syntax-highlighting.

Executors are also built correctly. 


## Test plan

CI + manual test via compose.

---------

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2023-04-28 10:41:13 +02:00
Dave Try
c5d638bfda
ci: revert bazel builds (#51190)
revert bazel changes due to errors with syntax-highlighter

## Test plan

CI
2023-04-26 23:19:36 +00:00
Dave Try
5b198be1b4
bazel: build all binaries with bazel for inclusion in docker images (#51104)
Build docker images with bazel compiled binaries

---------

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2023-04-26 14:18:05 -05:00
William Bezuidenhout
d0d1507181
add default value for DOCKER_BAZEL (#50324)
Adding a defauilt value for the Docker Bazel variable used in the build
scripts

## Test plan
ran the script locally to see how it works with and without the variable
set
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
2023-04-04 08:55:14 +00:00
Dave Try
e60a8f573b
bazel: build docker images binary with bazel (#49525)
Build the remaining docker images with bazel 

Depends on:

https://github.com/sourcegraph/sourcegraph/pull/49228


## Test plan

CI

---------

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
2023-03-22 14:22:07 +00:00
Robert Lin
601a1fecc5
build: fix version embeds (#11484) 2020-06-15 07:53:29 +08:00
Dax McDonald
9d56df7477
Warn users when sourcegraph becomes out of date (#10843)
This adds alerts when sourcegraph is out of date:
 - Months 1 & 2 outdated only admin is notified. Focus on upgrading being for features/bug fixes.
 - At 3 months, inform admin they may be missing important security bug fixes, warn them users will be notified at 4+ months.
 - 4 months, continue to inform admins of security risks but only inform users of bug fixes.
 - 6+ months, we additionally inform users of security risks, but we keep it just as. a warning level alert.
 - At +1 year, warnings turn to errors.
See site_alerts_test.go for completes spec.
It also removes animated alerts from Sourcegraph.

Co-authored-by: Stephen Gutekanst <stephen.gutekanst@gmail.com>
2020-06-10 17:16:39 -07:00
Geoffrey Gilmore
4bc292d580
ci: add shellcheck linter for shell scripts (#9903) 2020-04-21 10:03:17 -07:00
Geoffrey Gilmore
7970997428
dev: add shfmt for shell script consistency (#9900) 2020-04-15 12:44:36 -07:00
Geoffrey Gilmore
675eebd913
ci: use buildkit to parallelize separate stages (#6864) 2019-11-26 10:49:33 -08:00
Nick Snyder
85fba22315
Rename pkg to internal (#5898)
* git mv pkg internal

* fix imports in Go files

find ./ -type f -name '*.go' -exec sed -i '' -e 's/sourcegraph\/pkg\//sourcegraph\/internal\//g' {} \;

* fix imports in scripts

find ./ -type f -name '*.sh' -exec sed -i '' -e 's/sourcegraph\/pkg\//sourcegraph\/internal\//g' {} \;

* fix launch.sh

* go fmt ./...

* fix CODEOWNERS
2019-10-07 15:36:41 -07:00
Keegan Carruthers-Smith
f95cdb5eaa
build: Set -trimpath for go build (#5879)
This helps make builds more deterministic as well as easier to link pprof to
local source files. Added in go1.13. Description of trimpath below:

  remove all file system paths from the resulting executable. Instead of
  absolute file system paths, the recorded file names will begin with either
  "go" (for the standard library), or a module path@version (when using
  modules), or a plain import path (when using GOPATH).
2019-10-06 08:20:37 +02:00
Geoffrey Gilmore
4064c3e87f
ci: Move Docker labels declaration inside Dockerfile (#2813) 2019-03-18 17:49:29 -07:00
Geoffrey Gilmore
89b32c367e
ci: add commit and date labels to our docker images (#2806) 2019-03-18 13:36:25 -07:00
Keegan Carruthers-Smith
3c0dd652cc
all: Replace godockerize with Dockerfiles (#1976)
We use a branch of godockerize which generates a build.sh and Dockerfile instead
of directly building the docker image.
https://github.com/sourcegraph/godockerize/tree/gen-build

This was run on all main entrypoints (excluding a few which already have a
build.sh / shouldn't be docker images):

  go list -f '{{ if (eq .Name "main") }}{{.ImportPath}}{{ end }}' ./... \
    | grep cmd | grep -v goreman | grep -v 'schemadoc' | grep -v /server \
    | while read pkg; do godockerize build $pkg; done

The build.sh should likely be refactored into using a shared shell script. But
for now this gives us a nice and easy to change replacement.

This commit also removes godockerize from CI and our go.mod.
2019-01-22 13:27:36 +02:00