Skip to content

Commit

Permalink
Updating cronjob bash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 committed Feb 20, 2024
1 parent 04421c7 commit 61b58b9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
14 changes: 0 additions & 14 deletions host-wsl/pull-build-start.sh

This file was deleted.

14 changes: 14 additions & 0 deletions repo-converter/build/pull-build-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# To be used in a cronjob to always pull and build the latest commit to the current branch
# every 10 minutes
# so that the running container is only 10 minutes behind the latest commit in the branch

# crontab -e
# */10 * * * * sudo bash /sourcegraph/implementation-bridges/repo-converter/build/pull-build-start.sh >> /sourcegraph/implementation-bridges/repo-converter/build/pull-build-start.log 2>&1

repo_converter_build_path="/sourcegraph/implementation-bridges/repo-converter/build"

git -C $repo_converter_build_path pull

docker compose -f $repo_converter_build_path/docker-compose.yaml up -d --build
13 changes: 13 additions & 0 deletions repo-converter/pull-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# To be used in a cronjob to always pull and use the latest image
# so that the running container is only x minutes/hours behind the latest version of the docker-compose.yaml file, and the Docker image tagged latest in GitHub packages

# crontab -e
# */10 * * * * sudo bash /sourcegraph/implementation-bridges/repo-converter/pull-start.sh >> /sourcegraph/implementation-bridges/repo-converter/pull-start.log 2>&1

repo_converter_path="/sourcegraph/implementation-bridges/repo-converter"

git -C $repo_converter_path pull

docker compose -f $repo_converter_path/docker-compose.yaml up -d

0 comments on commit 61b58b9

Please sign in to comment.