Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docker hub push for matrix #40

Merged
merged 3 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions .github/workflows/docker-hub-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
repositories: ["kennyopennix/wazuh-agent", "kennyopennix/wazuh-agent-amazonlinux", "kennyopennix/wazuh-agent-ubuntu"]
include:
- dockerfile: ./Dockerfile
image: kennyopennix/wazuh-agent
Expand Down Expand Up @@ -61,31 +62,15 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
sername: ${{ secrets.DOCKERHUB_USERNAME }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Update repo description Wazuh agent minideb description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: kennyopennix/wazuh-agent

- name: Update repo description Wazuh agent amazonlinux description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: kennyopennix/wazuh-agent-amazonlinux
- name: Update repo description Wazuh agent ubuntu description
- name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: kennyopennix/wazuh-agent-amazonlinux
repository: ${{ matrix.repositories }}
1 change: 1 addition & 0 deletions .github/workflows/tests-wazuh-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand Down Expand Up @@ -37,7 +37,7 @@ repos:
- id: shellcheck
- id: shfmt
- repo: https://github.com/jorisroovers/gitlint
rev: 'v0.19.0dev'
rev: 'v0.19.1'
hooks:
- id: gitlint
- repo: local
Expand All @@ -49,6 +49,6 @@ repos:
entry: flake8
types: [python]
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: 'v1.3.1'
rev: 'v1.3.2'
hooks:
- id: python-safety-dependencies-check
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ docker run --rm kennyopennix/wazuh-agent:latest
## Run docker-compose

```shell
docker compose up -d
docker compose up -d
```

Will run Wazuh cluster in single node mode and 3 agents
Expand Down Expand Up @@ -117,4 +117,3 @@ docker build . -t wazuh-agent:latest
## Support project

<a href="https://www.buymeacoffee.com/pyToshka" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ markupsafe==2.1.1
pytest==7.4.4
pytest-testinfra==8.1.0
black==23.12.1

2 changes: 1 addition & 1 deletion tests/amazonlinux/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

root_dir = os.path.abspath(os.curdir)
base_image = os.getenv("IMAGE_NAME", "wazuh-agent-amazonlinux:testinfra")
docker_file = os.getenv("DOCKERFILE", f"images/Dockerfie.amazonlinux")
docker_file = os.getenv("DOCKERFILE", "images/Dockerfie.amazonlinux")


@pytest.fixture(scope="session")
Expand Down
2 changes: 1 addition & 1 deletion tests/minideb/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

root_dir = os.path.abspath(os.curdir)
base_image = os.getenv("IMAGE_NAME", "wazuh-agent-minideb:testinfra")
docker_file = os.getenv("DOCKERFILE", f"Dockerfile")
docker_file = os.getenv("DOCKERFILE", "Dockerfile")


@pytest.fixture(scope="session")
Expand Down
2 changes: 1 addition & 1 deletion tests/single-node/config/wazuh_indexer/wazuh.indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ plugins.security.restapi.roles_enabled:
plugins.security.system_indices.enabled: true
plugins.security.system_indices.indices: [".opendistro-alerting-config", ".opendistro-alerting-alert*", ".opendistro-anomaly-results*", ".opendistro-anomaly-detector*", ".opendistro-anomaly-checkpoints", ".opendistro-anomaly-detection-state", ".opendistro-reports-*", ".opendistro-notifications-*", ".opendistro-notebooks", ".opensearch-observability", ".opendistro-asynchronous-search-response*", ".replication-metadata-store"]
plugins.security.allow_default_init_securityindex: true
cluster.routing.allocation.disk.threshold_enabled: false
cluster.routing.allocation.disk.threshold_enabled: false
2 changes: 1 addition & 1 deletion tests/ubuntu/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

root_dir = os.path.abspath(os.curdir)
base_image = os.getenv("IMAGE_NAME", "wazuh-agent-ubuntu:testinfra")
docker_file = os.getenv("DOCKERFILE", f"images/Dockerfie.ubuntu")
docker_file = os.getenv("DOCKERFILE", "images/Dockerfie.ubuntu")


@pytest.fixture(scope="session")
Expand Down