Skip to content

Commit f8343c6

Browse files
Merge branch 'main' into promote/release-v5.11.3601
2 parents 548d043 + cd0ec00 commit f8343c6

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This file contains the pgsql service definition (the primary Sourcegraph database deployment),
2+
# as well as the codeintel-db service definition (a separate postgres deployment). Both run postgres.
3+
# This file is used during the sourcegraph/server -> docker-compose migration process.
4+
#
5+
# 🚨This file MUST be kept in sync with the pgsql definition in docker-compose/docker-compose.yaml
6+
version: '2.4'
7+
services:
8+
# Description: PostgreSQL database for various data.
9+
#
10+
# Disk: 128GB / persistent SSD
11+
# Ports exposed to other Sourcegraph services: 5432/TCP 9187/TCP
12+
# Ports exposed to the public internet: none
13+
#
14+
pgsql:
15+
container_name: pgsql
16+
image: 'index.docker.io/sourcegraph/postgresql-16:5.11.0@sha256:d9d6b98e9b3f027d625af1587e7658f7c16b68cad337440977953541321acdf1'
17+
cpus: 4
18+
mem_limit: '2g'
19+
healthcheck:
20+
test: '/liveness.sh'
21+
interval: 10s
22+
timeout: 1s
23+
retries: 3
24+
start_period: 15s
25+
volumes:
26+
- 'pgsql:/data/'
27+
networks:
28+
- sourcegraph
29+
restart: always
30+
31+
codeintel-db:
32+
container_name: codeintel-db
33+
image: 'index.docker.io/sourcegraph/postgresql-16:5.11.0@sha256:d9d6b98e9b3f027d625af1587e7658f7c16b68cad337440977953541321acdf1'
34+
cpus: 4
35+
mem_limit: '2g'
36+
healthcheck:
37+
test: '/liveness.sh'
38+
interval: 10s
39+
timeout: 1s
40+
retries: 3
41+
start_period: 15s
42+
volumes:
43+
- 'codeintel-db:/data/'
44+
networks:
45+
- sourcegraph
46+
restart: always
47+
48+
volumes:
49+
pgsql:
50+
codeintel-db:
51+
networks:
52+
sourcegraph:

release.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,47 @@ promoteToPublic:
247247
cat << EOF | buildkite-agent annotate --style info
248248
Promoted release is **publicly available** through a git tag at [\`{{version}}\`](https://github.com/sourcegraph/deploy-sourcegraph-docker/tree/{{version}}).
249249
EOF
250+
251+
- name: "update main with latest version"
252+
- name: "git"
253+
cmd: |
254+
set -eu
255+
branch="promote/release-{{version}}-update-main"
256+
echo "Checking out origin/main"
257+
git fetch origin main
258+
git switch main
259+
echo "Creating branch origin/${branch}"
260+
git switch -c "${branch}"
261+
262+
- name: docker(compose):tags
263+
cmd: |
264+
set -eu
265+
registry=index.docker.io/sourcegraph
266+
sg ops update-images --registry ${registry} --kind compose --pin-tag {{inputs.server.tag}} --docker-username $DOCKER_USERNAME --docker-password $DOCKER_PASSWORD docker-compose/
267+
268+
- name: docker(shell):tags
269+
cmd: |
270+
set -eu
271+
registry=index.docker.io/sourcegraph
272+
sg ops update-images --registry ${registry} --kind shell --pin-tag {{inputs.server.tag}} --docker-username $DOCKER_USERNAME --docker-password $DOCKER_PASSWORD pure-docker/
273+
274+
- name: "git:branch"
275+
cmd: |
276+
set -eu
277+
branch="promote/release-{{version}}-update-main"
278+
git commit -am 'prep update main: {{version}}' -m 'update main with latest release'
279+
git push origin "${branch}"
280+
281+
- name: "github:pr"
282+
cmd: |
283+
set -eu
284+
internal_branch="promote/release-{{version}}-update-main"
285+
# we need to fetch from origin just in case this branch doesn't exist locally, so that the PR can find the base
286+
git fetch origin "${internal_branch}"
287+
gh pr create \
288+
--fill \
289+
--draft \
290+
--base "$internal_branch" \
291+
--title "Update main: build {{version}}" \
292+
--body "Test plan: automated release PR, CI will perform additional checks"
293+
echo "🚢 Please check the associated CI build to ensure the process completed".

0 commit comments

Comments
 (0)