-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from wazuh/feature-235-dockerfile-improvement
Improvements for Jenkins build's dockerfile
- Loading branch information
Showing
10 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ruby | ||
|
||
RUN apt-get update && apt install docker.io git curl wget -y | ||
|
||
RUN apt-get update | ||
|
||
RUN gem install kitchen-docker && \ | ||
gem install rbnacl && \ | ||
gem install rbnacl-libsodium && \ | ||
gem install bcrypt_pbkdf && \ | ||
gem install berkshelf && \ | ||
gem install httpclient | ||
|
||
RUN cd $HOME && \ | ||
git clone https://github.com/wazuh/wazuh-qa.git && \ | ||
cd $HOME/wazuh-qa && \ | ||
git checkout devel && \ | ||
cd $HOME/wazuh-qa/kitchen/wazuh-chef/manager/files/ && \ | ||
bundle install | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py | ||
|
||
RUN pip install pytest && pip install testinfra && pip install paramiko | ||
|
||
# Standard SSH port | ||
EXPOSE 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM ruby | ||
|
||
CMD tail -f /dev/null | ||
|
||
COPY entrypoint.sh /usr/local/bin/ | ||
|
||
RUN chmod 777 /usr/local/bin/entrypoint.sh \ | ||
&& ln -s /usr/local/bin/entrypoint.sh / | ||
|
||
ENTRYPOINT ["entrypoint.sh"] | ||
|
||
RUN apt-get update && apt install docker.io git curl wget -y | ||
|
||
RUN apt-get update | ||
|
||
RUN gem install kitchen-docker && \ | ||
gem install rbnacl && \ | ||
gem install rbnacl-libsodium && \ | ||
gem install bcrypt_pbkdf && \ | ||
gem install berkshelf && \ | ||
gem install httpclient | ||
|
||
RUN cd $HOME && \ | ||
git clone https://github.com/wazuh/wazuh-qa.git && \ | ||
cd $HOME/wazuh-qa && \ | ||
git checkout devel && \ | ||
cd $HOME/wazuh-qa/kitchen/wazuh-chef/manager/files/ && \ | ||
bundle install | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py | ||
|
||
RUN pip install pytest && pip install testinfra && pip install paramiko | ||
|
||
# Standard SSH port | ||
EXPOSE 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
CHEF_SOURCE_BRANCH=$1 | ||
CHEF_TARGET_BRANCH=$2 | ||
QA_BRANCH=$3 | ||
|
||
|
||
cd $HOME/wazuh-qa/ && \ | ||
git pull --all && \ | ||
git checkout $QA_BRANCH && \ | ||
git pull | ||
|
||
cd $HOME && \ | ||
git clone https://github.com/wazuh/wazuh-chef.git && \ | ||
cd $HOME/wazuh-chef/ && \ | ||
git checkout $CHEF_SOURCE_BRANCH && \ | ||
git pull && \ | ||
git checkout $CHEF_TARGET_BRANCH && \ | ||
git pull && \ | ||
git checkout $CHEF_SOURCE_BRANCH && \ | ||
git merge $CHEF_SOURCE_BRANCH | ||
|
||
cp -rf $HOME/wazuh-qa/kitchen/wazuh-chef/manager/files/* $HOME/wazuh-chef/cookbooks/wazuh_manager/ | ||
cp -rf $HOME/wazuh-qa/kitchen/wazuh-chef/manager/test/* $HOME/wazuh-chef/cookbooks/wazuh_manager/test/ | ||
cp -rf $HOME/wazuh-qa/kitchen/wazuh-chef/manager/test_environment/* $HOME/wazuh-chef/cookbooks/wazuh_manager/test/environments/ | ||
cp -rf $HOME/wazuh-qa/kitchen/wazuh-chef/agent/* $HOME/wazuh-chef/cookbooks/wazuh_agent/test/environments/ | ||
|
||
|
||
cd $HOME/wazuh-chef/cookbooks/wazuh_manager/ && \ | ||
mkdir .kitchen | ||
|
||
cd $HOME/wazuh-chef/cookbooks/wazuh_manager/ && \ | ||
ls -ltrh | ||
chmod +x run.sh && \ | ||
chmod +x clean.sh && \ | ||
rm .kitchen.yml | ||
|
||
tail -f /dev/null |