Skip to content

Commit

Permalink
Update CI : use docker compose instead of docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentD06 committed Oct 11, 2024
1 parent d68f16b commit d31be82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
docker-compose --project-directory ../runtime pull
docker compose --project-directory ../runtime pull
PYTHONUNBUFFERED=true python -m unittest --verbose
- name: Package signed .rpm
if: endsWith(steps.requestPom.outputs.VERSION,'SNAPSHOT') == false
Expand Down
1 change: 0 additions & 1 deletion runtime/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# * https://go2docs.graylog.org/5-1/downloading_and_installing_graylog/docker_installation.htm
# * https://github.com/Graylog2/docker-compose

version: '3'
services:

# MongoDB: https://hub.docker.com/_/mongo/
Expand Down
6 changes: 3 additions & 3 deletions validation/graylog_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ def __init__(self, docker_compose_path):
self._log_offset = 0

def start(self):
subprocess.run(['docker-compose', 'up', '--detach'], cwd=self._docker_compose_path)
subprocess.run(['docker', 'compose', 'up', '--detach'], cwd=self._docker_compose_path)

def extract_all_logs(self):
return subprocess.check_output(['docker-compose', 'logs', '--no-color', 'graylog'], cwd=self._docker_compose_path, universal_newlines=True)
return subprocess.check_output(['docker', 'compose', 'logs', '--no-color', 'graylog'], cwd=self._docker_compose_path, universal_newlines=True)

def start_logs_capture(self):
logs = self.extract_all_logs()
Expand All @@ -22,5 +22,5 @@ def extract_logs(self):
return logs[self._log_offset:]

def stop(self):
subprocess.run(['docker-compose', 'down'], cwd=self._docker_compose_path)
subprocess.run(['docker', 'compose', 'down'], cwd=self._docker_compose_path)
subprocess.run(['docker', 'volume', 'prune', '--force'])

0 comments on commit d31be82

Please sign in to comment.