Skip to content

Commit

Permalink
Merge branch 'main' into promote/release-v5.11.3601
Browse files Browse the repository at this point in the history
  • Loading branch information
Chickensoupwithrice authored Jan 9, 2025
2 parents 548d043 + cd0ec00 commit f8343c6
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docker-compose/db-only-migrate.docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This file contains the pgsql service definition (the primary Sourcegraph database deployment),
# as well as the codeintel-db service definition (a separate postgres deployment). Both run postgres.
# This file is used during the sourcegraph/server -> docker-compose migration process.
#
# 🚨This file MUST be kept in sync with the pgsql definition in docker-compose/docker-compose.yaml
version: '2.4'
services:
# Description: PostgreSQL database for various data.
#
# Disk: 128GB / persistent SSD
# Ports exposed to other Sourcegraph services: 5432/TCP 9187/TCP
# Ports exposed to the public internet: none
#
pgsql:
container_name: pgsql
image: 'index.docker.io/sourcegraph/postgresql-16:5.11.0@sha256:d9d6b98e9b3f027d625af1587e7658f7c16b68cad337440977953541321acdf1'
cpus: 4
mem_limit: '2g'
healthcheck:
test: '/liveness.sh'
interval: 10s
timeout: 1s
retries: 3
start_period: 15s
volumes:
- 'pgsql:/data/'
networks:
- sourcegraph
restart: always

codeintel-db:
container_name: codeintel-db
image: 'index.docker.io/sourcegraph/postgresql-16:5.11.0@sha256:d9d6b98e9b3f027d625af1587e7658f7c16b68cad337440977953541321acdf1'
cpus: 4
mem_limit: '2g'
healthcheck:
test: '/liveness.sh'
interval: 10s
timeout: 1s
retries: 3
start_period: 15s
volumes:
- 'codeintel-db:/data/'
networks:
- sourcegraph
restart: always

volumes:
pgsql:
codeintel-db:
networks:
sourcegraph:
44 changes: 44 additions & 0 deletions release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,47 @@ promoteToPublic:
cat << EOF | buildkite-agent annotate --style info
Promoted release is **publicly available** through a git tag at [\`{{version}}\`](https://github.com/sourcegraph/deploy-sourcegraph-docker/tree/{{version}}).
EOF
- name: "update main with latest version"
- name: "git"
cmd: |
set -eu
branch="promote/release-{{version}}-update-main"
echo "Checking out origin/main"
git fetch origin main
git switch main
echo "Creating branch origin/${branch}"
git switch -c "${branch}"
- name: docker(compose):tags
cmd: |
set -eu
registry=index.docker.io/sourcegraph
sg ops update-images --registry ${registry} --kind compose --pin-tag {{inputs.server.tag}} --docker-username $DOCKER_USERNAME --docker-password $DOCKER_PASSWORD docker-compose/
- name: docker(shell):tags
cmd: |
set -eu
registry=index.docker.io/sourcegraph
sg ops update-images --registry ${registry} --kind shell --pin-tag {{inputs.server.tag}} --docker-username $DOCKER_USERNAME --docker-password $DOCKER_PASSWORD pure-docker/
- name: "git:branch"
cmd: |
set -eu
branch="promote/release-{{version}}-update-main"
git commit -am 'prep update main: {{version}}' -m 'update main with latest release'
git push origin "${branch}"
- name: "github:pr"
cmd: |
set -eu
internal_branch="promote/release-{{version}}-update-main"
# we need to fetch from origin just in case this branch doesn't exist locally, so that the PR can find the base
git fetch origin "${internal_branch}"
gh pr create \
--fill \
--draft \
--base "$internal_branch" \
--title "Update main: build {{version}}" \
--body "Test plan: automated release PR, CI will perform additional checks"
echo "🚢 Please check the associated CI build to ensure the process completed".

0 comments on commit f8343c6

Please sign in to comment.