Commit Graph

234 Commits

Author SHA1 Message Date
Ólafur Páll Geirsson
6388f82c41
Bump syntax-highlighter docker container for single-docker deployment (#51616)
Supersedes https://github.com/sourcegraph/sourcegraph/pull/51616

## Test plan

See CI green.
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

---------

Co-authored-by: Hunter Fernandes <hgfern@gmail.com>
2023-05-09 18:28:55 +02:00
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
Will Dollman
c9ddb0dc5a
Update to use curl from Alpine 3.17 (#50584)
## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

- Manually checked version locally
2023-04-13 09:27:51 +00:00
Jean-Hadrien Chabran
82a48660ad
hotfix: temporarily revert to curl 7.X (#50570)
For now, we disable this, because the latest release of curl on edge
segfaults on 3.14. We'll be releasing a fix before the patch release.
DRI: @jhchabran

## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

docker run + `wget` = no segfault.
2023-04-12 19:39:23 +00:00
Vincent
9a2904203c
dep: resolve CVE-2023-0464 in base image 2/2 (#50261)
This PR updates the base images for our docker files to a version of
Alpine without vulnerabilities.

## Test plan
Pipelines from https://github.com/sourcegraph/sourcegraph/pull/50248
indicate that there are no vulnerabilities in the base image.

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
2023-04-02 18:24:34 +02:00
Vincent
ee981a6c2c
dep: use new docker base (#49706)
Use the new docker image as the base image for our images. This is uses
the newly released `curl` version.

## Test plan
- [x] ci tests

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
2023-03-20 18:15:21 +01:00
Peter Guy
3d9b72e43c
test the code host connection for Perforce (fixes #43855) (#49069)
# changes

- add p4 to the repo-updater Dockerfile
- bump the version of p4 from 21.2 to 22.2 for all Dockerfiles, and add
hash checking of the download
- enhance the Perforce VCSSyncer so that it captures the output of `p4
depots` and matches it to the given depot, returning errors if the given
depot doen't match any of the depots returned by `p4 depots`
- fill out `ListRepos` in the Perforce Source so that it calls the
Perforce VCSSyncer's IsCloneable, which checks the given depot agains
the depots from the Perforce server

# before and after videos

https://www.loom.com/share/73099aa7f0ec4427a564f07b80a19a46
https://www.loom.com/share/b7d38469baab496ea50ab22bdfa256da

## Test plan
Add or edit a code host with purposefully wrong connection info; either
the host/port, the username, or the password. A warning message will
display (sometimes a timeout message displays instead) in the Manage
Code Host screen, and an error message will display in the list of code
hosts (sometimes have to wait for the next sync before that appears).

Add or modify a depot so that it is invalid. The repository count will
not increase, and an error message will display in the list of code
hosts. There's no error message in the Manage Code Hose screen, which
would be nice - fodder for iteration.
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Indradhanush Gupta <indradhanush.gupta@gmail.com>
2023-03-10 13:16:22 -08:00
Vincent
b3ba5ec9b4
Use new base image with curl from edge/main (#48144)
Use latest `curl` in our base-images
2023-02-23 19:40:07 +00:00
Vincent
e4fe8cf9c2
Resolve SSL issues in containers (#48042)
Replace the old base image with the new updated one. Resolving the SSL
issues in new container builds.
2023-02-22 14:34:32 +00:00
Vincent
b55538206b
Bump up included git version (#47892)
Update `git` binary to address discovered vulnerabilities.
2023-02-20 16:32:00 +00:00
Vincent
ef114ac72b
Use newer alpine base-image (#47265) 2023-02-01 14:16:49 +00:00
Keegan Carruthers-Smith
1bd6ea5d35
all: update git to 2.39.1 (#46620)
There is a new git vulnerability which may affect us since we do run
"git archive". Security scanners are not yet reporting this, but more
details can be found at
https://github.blog/2023-01-17-git-security-vulnerabilities-announced-2/

Note: alpine@edge is currently at 2.39.1-r1.

Test Plan: get CI to build images, pull them and confirm git version via

  docker run --entrypoint=git IMAGE version
2023-01-18 10:53:36 +02:00
Noah S-C
23ccee9d00
codeintel: use new upstream musl coursier builds (#46165) 2023-01-05 19:20:41 +00:00
Vincent
61d5544660
Use new alpine base image (#45937) 2022-12-22 19:57:05 +01:00
Stephen Gutekanst
aaab838cb3
cmd/server: correct usage of blobstore backend (#45029)
* Revert "Revert "blobstore: bring changes back (#45014)" (#45024)"

This reverts commit afc1201839.

* cmd/server: correct usage of blobstore backend
* cmd/server: correct s3proxy authorization method
* cmd/server: fix blobstore port

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2022-12-01 23:11:46 +00:00
Kalan
afc1201839
Revert "blobstore: bring changes back (#45014)" (#45024)
This reverts commit e03ca0f153.
2022-12-01 22:21:48 +00:00
Dave Try
1cc5cd68e9
fix syntect/syntax highlighter naming in server image (#45005)
* remove ref to syntect

* fix typo

* still use syntect

* copy new binary

* syntax_highlighter
2022-12-01 22:01:13 +00:00
Stephen Gutekanst
e03ca0f153
blobstore: bring changes back (#45014)
* bring back blob store PRs (#44991)

This reverts commit 5c5ccffbe0.

* blobstore: add missing env var

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2022-12-01 13:29:22 -07:00
Ólafur Páll Geirsson
f9e6faa710
Update syntax-highlighter docker container (#42486)
* Update syntax-highlighter docker container

Context https://sourcegraph.slack.com/archives/C022SPMNR0W/p1663771635349499

Fixes #41493

Previously, the single container deployment option used an old version
of our syntax highlighter causing several new features to no longer
work, including C# highligting and the new `"syntaxHighlighting"`
site-config section.

* change all instances of syntect to syntax_highlighter

* revert to syntect binary

* Update docker-images/syntax-highlighter/Dockerfile

Co-authored-by: Sander Ginn <sanderginn@users.noreply.github.com>

Co-authored-by: davejrt <davetry@gmail.com>
Co-authored-by: Sander Ginn <sanderginn@users.noreply.github.com>
2022-12-01 09:02:47 -05:00
Keegan Carruthers-Smith
5c5ccffbe0
revert both blob store PRs (#44991)
* Revert "blobstore: build s3proxy from source ourselves; use our base alpine image (#44976)"

This reverts commit c5181d0696.

* Revert "cmd/server: remove minio support (default to blobstore) (#44979)"

This reverts commit e49509fa97.

* server: use sg/log for minio
2022-12-01 15:12:43 +02:00
Stephen Gutekanst
e49509fa97
cmd/server: remove minio support (default to blobstore) (#44979)
* cmd/server: remove minio support (default to blobstore)

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2022-11-30 22:25:43 -07:00
Stephen Gutekanst
2a2278f45f
all: introduce sourcegraph/blobstore; add option to cmd/server (#44255)
* all: add new sg blobstore backend to supersede minio
* cmd/server: optionally run sg blobstore backend over minio
* lsifuploadstore: add minio back to help text
* sg generate
* uploadstore: add DeleteObjects / NewListObjectsV2Paginator to s3API interface
* uploadstore: regenerate mocks
* uploadstore: add gcsAPI.Objects listing API
* uploadstore: regenerate mocks
* uploadstore: add Store.ExpireObjects stub implementation (thanks eric)
* uploadstore: implement ExpireObjects in GCS/S3/Lazy interfaces
* worker: integrate lsifuploadstore expirer
* uploadstore: update test API calls
* uploadstore: add TODO for myself
* uploadstore: batch S3 object deletions
* uploadstore: use operation logger instead of log15
* cmd/server: use sglog
* cmd/server: fix image build

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2022-11-30 16:04:48 -07:00
Idan Varsano
c7b81c164a
Upgrade git version to 2.38.1 in Gitserver and Server Docker Images (#43615)
* Upgrade git version to 2.38.1
2022-11-02 15:11:25 +00:00
Keegan Carruthers-Smith
f885c53472
all: update alpine image (#43655)
This updates the alpine image we use to the one built in 84d1e240bb.
This is to update libxml2 for CVE-2022-40303 CVE-2022-40304.

Test Plan: CI
2022-10-31 10:35:37 +02:00
Keegan Carruthers-Smith
e7381bf4b8
all: include git-lfs in gitserver docker images (#43401)
We add the optional dependency git-lfs to any image gitserver may run
on. This is still an experimental feature, but is a requirement when
enabled.

Additionally we include it in the nix devenv since its cheap to add.

Note: git-lfs is a relatively small go binary and does not require
specific versions of git. Additionally git will not automatically use
it, so its presence will not change behaviour.

Test Plan: CI docker image dry run
2022-10-25 15:40:30 +02:00
Keegan Carruthers-Smith
db6c4cd841
all: update Dockerfile to use latest alpine-3.14 (#42259)
We updated sourcegraph/alpine-3.14 today in 3b3879b9 to remove a bunch
of CVEs in bind-tools. This commit makes it so we use the new image.

Test Plan: CI works and has far less security reports.
2022-09-28 20:05:50 +00:00
Feroz Salam
c1fe42094d
Upgrade minio to latest version (#41715) 2022-09-19 07:31:37 +08:00
Vincent
ed6290c70f
Update minio version (#41106)
update minio version
2022-08-31 12:29:16 +02:00
Andre Eleuterio
1a2c0f5f2b
Update alpine consumers (#40279)
Update base alpine images
2022-08-11 17:03:24 -03:00
Andre Eleuterio
3425e51913
Update sg server minio (#40041) 2022-08-05 20:21:20 -03:00
Idan Varsano
dd628e02c0
Revert "Update git to 2.35.2 in docker images (#37712)" (#39537)
This reverts commit 04c98ab493.
2022-07-27 16:10:35 -06:00
Feroz Salam
d31a568513
Update minio image in server Dockerfile (#38758)
This brings minio in line with the version in docker-images/minio/Dockerfile
2022-07-14 12:40:14 +05:30
Andre Eleuterio
7c8315ca77
Bump alpine base image (#38423)
* Bump curl version

* Update base alpine image

* Bump base alpine images
2022-07-07 13:01:37 -03:00
Rijnard van Tonder
2fd03995b9
search: bump comby 1.8.1 (#37804) 2022-06-28 11:39:49 -07:00
Indradhanush Gupta
04c98ab493
Update git to 2.35.2 in docker images (#37712)
This addresses the vulnerabilities disclosed in https://github.blog/2022-04-12-git-security-vulnerability-announced/

This PR also removes the usage of `&&` within the `RUN` command to help present a clean output on build failures.
2022-06-24 22:00:40 +05:30
Indradhanush Gupta
7e1bdd6dbf
Revert "Update git to 2.35.2 in docker images" (#37622)
Revert "Update git to 2.35.2 in docker images (#37547)"

This reverts commit 69fb3c7ae4.
2022-06-23 15:07:32 +00:00
Indradhanush Gupta
69fb3c7ae4
Update git to 2.35.2 in docker images (#37547)
This addresses the vulnerabilities disclosed in https://github.blog/2022-04-12-git-security-vulnerability-announced/
2022-06-23 19:16:57 +05:30
Rijnard van Tonder
ff5d37f9f7
search: bump comby 1.8.0 (#37533) 2022-06-22 02:06:28 +00:00
Dave Try
3e4f33a3a8
Revert "Update server bundled postgres (#37178)" (#37217)
This reverts commit 46179457cc.
2022-06-14 14:25:26 +00:00
Andre Eleuterio
46179457cc
Update server bundled postgres (#37178)
Update postgres version
2022-06-14 10:29:18 +02:00
Andre Eleuterio
46f57624bd
Update base images (#37132)
* Update migrator base image

* upgrade images

* lint

* add lint skips
2022-06-14 00:49:53 +02:00
Rijnard van Tonder
01e08ff3af
bump comby version to 1.7.1 (#35830) 2022-05-20 20:12:01 -07:00
Keegan Carruthers-Smith
fa6a244424
all: use alpine-3.14 (#34508)
We have a 3.14 image available, but when we introduced it we ran into problems
using it. This updates all images to use the newer version of alpine.

  ruplacer --go \
    sourcegraph/alpine-3.12:142406_2022-04-14_8836ac3499f4@sha256:4681a48d1fb9a73fef1b540c08b3411f797351bbeda749f5dca21213a1e71526 \
    sourcegraph/alpine-3.14:142406_2022-04-14_8836ac3499f4@sha256:2a2d1cbaec78882661fe1aa5b0a4af0c23a37be2ea9ff8aadc2da5b80852c233

I also had to pin postgresql in the server image since we can't upgrade it
otherwise customer upgrades fail (incompatible on disk data). Additionally we
had to include libstc++ and libgcc for tree sitter.

Risks: I am relying on our CI to catch problems with this upgrade. The main
risks here are us not testing things which exercise non-go binaries that rely
on shared libraries. What comes to mind is things like p4 and tree-sitter, I
am unsure if they get properly exercised. However, I think now is a good time
to land a change like this since we have a lot of time until branch cut.

Test Plan: main dry run on CI to test docker image building and integration
testing.
2022-05-04 11:41:54 +02:00
Ryan Slade
2fc7024cfd
gitserver: Upgrade to the 2021.2 release of perforce tools (#34625) 2022-04-28 10:51:56 +02:00
Keegan Carruthers-Smith
8824c9f93c
gitserver: avoid lib-x64.tgz ending up in image (#34327)
I noticed lib-x64.tgz in a container. Instead of just adding a step
which removes it, we can avoid it ever being in a layer.

Test Plan: master dry run
2022-04-22 09:27:43 +02:00
Andre Eleuterio
d7f2d1dce0
Update base alpine images (#33938)
* Upgrade base alpine

* Upgrade base alpine 3.14
2022-04-14 17:37:12 -03:00
Kevin Wojkovich
938f4497bf
security: patch openssl libs against CVE 2022-0778 (#32720)
* security: patch openssl libs against CVE 2022-0778

* docker: patch alpine-3.12 dependant images

* docker: patch alpine-3.14 dependant images

* docker: update libxslt for cve-2021-30560 fix

* docker: patch redis images against CVE-2022-0778

* fix typo
2022-03-17 09:15:07 -05:00
Kevin Wojkovich
dc15c520d9
docker: update alpine base image (#32622)
* docker: update alpine base image

* minio: update to latest version
2022-03-16 06:35:07 -05:00