From 6dab191255cbfce93e4e377becd6548332561309 Mon Sep 17 00:00:00 2001 From: "Manuel J. Bernal" Date: Mon, 4 May 2020 15:23:48 +0200 Subject: [PATCH 1/6] First GitHub action test --- .github/workflows/push.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000..617fe915 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ feature-github-actions ] + pull_request: + branches: [ feature-github-actions ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build wazuh/Dockerfile --tag wazuh:$(date +%s) \ No newline at end of file From fa550369433791969593734ab338c5783be9833d Mon Sep 17 00:00:00 2001 From: "Manuel J. Bernal" Date: Mon, 4 May 2020 15:25:39 +0200 Subject: [PATCH 2/6] Added parameter to build --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 617fe915..f5ee010f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,4 +15,4 @@ jobs: steps: - uses: actions/checkout@v2 - name: Build the Docker image - run: docker build wazuh/Dockerfile --tag wazuh:$(date +%s) \ No newline at end of file + run: docker build wazuh --file Dockerfile --tag wazuh:$(date +%s) \ No newline at end of file From 63880eab515372e193103cab69f62ab23aaf57a1 Mon Sep 17 00:00:00 2001 From: "Manuel J. Bernal" Date: Mon, 4 May 2020 15:27:05 +0200 Subject: [PATCH 3/6] WIP: test build execution --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f5ee010f..5a209e60 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,4 +15,4 @@ jobs: steps: - uses: actions/checkout@v2 - name: Build the Docker image - run: docker build wazuh --file Dockerfile --tag wazuh:$(date +%s) \ No newline at end of file + run: docker build wazuh --tag wazuh:$(date +%s) \ No newline at end of file From a00d16afcd2b5617cbca9298ab4579b9afe97bc9 Mon Sep 17 00:00:00 2001 From: manuasir Date: Thu, 30 Jul 2020 00:02:07 +0200 Subject: [PATCH 4/6] WIP CI: testing docker-compose build --- .github/workflows/push.yml | 20 ++++++++------------ docker-compose.yml | 8 ++++---- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5a209e60..44d66f5b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,18 +1,14 @@ -name: Docker Image CI +name: Wazuh Docker pipeline -on: - push: - branches: [ feature-github-actions ] - pull_request: - branches: [ feature-github-actions ] +on: [push] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build the Docker image - run: docker build wazuh --tag wazuh:$(date +%s) \ No newline at end of file + - name: Check out code + uses: actions/checkout@v2 + - name: Build the docker-compose stack + run: docker-compose -f docker-compose.yml + - name: Check running containers + run: docker ps -a \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index c2edca63..8440fa6c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '2' services: wazuh: - image: wazuh/wazuh:3.13.1_7.8.0 + build: wazuh hostname: wazuh-manager restart: always ports: @@ -13,7 +13,7 @@ services: - "55000:55000" elasticsearch: - image: wazuh/wazuh-elasticsearch:3.13.1_7.8.0 + build: elasticsearch hostname: elasticsearch restart: always ports: @@ -30,7 +30,7 @@ services: mem_limit: 2g kibana: - image: wazuh/wazuh-kibana:3.13.1_7.8.0 + build: kibana hostname: kibana restart: always depends_on: @@ -40,7 +40,7 @@ services: - wazuh:wazuh nginx: - image: wazuh/wazuh-nginx:3.13.1_7.8.0 + build: nginx hostname: nginx restart: always environment: From ebd416615e89fe7849f3cfe2765e206dc920bf19 Mon Sep 17 00:00:00 2001 From: manuasir Date: Thu, 30 Jul 2020 00:05:27 +0200 Subject: [PATCH 5/6] Modified run command for docker-compose build --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 44d66f5b..e5afb0b2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,6 +9,6 @@ jobs: - name: Check out code uses: actions/checkout@v2 - name: Build the docker-compose stack - run: docker-compose -f docker-compose.yml + run: docker-compose up -d --build - name: Check running containers run: docker ps -a \ No newline at end of file From 6f039f1de9c9710ce56c0e4aeab7608f01cc3d2e Mon Sep 17 00:00:00 2001 From: manuasir Date: Thu, 30 Jul 2020 00:16:02 +0200 Subject: [PATCH 6/6] Changed job name --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e5afb0b2..b427cf4b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: Wazuh Docker pipeline on: [push] jobs: - build: + build-stack: runs-on: ubuntu-latest steps: - name: Check out code @@ -11,4 +11,4 @@ jobs: - name: Build the docker-compose stack run: docker-compose up -d --build - name: Check running containers - run: docker ps -a \ No newline at end of file + run: docker ps -a