Skip to content

Commit

Permalink
Makefile test
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Nov 8, 2023
1 parent 9931556 commit 4879d3b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,4 @@ jobs:

- name: Run omnibus
run: |
cat <<EOF >>build_docker.sh
#!/bin/bash --login
# install omnibus' dependencies
bundle install
bundle binstubs --all
# build the metasploit-framework package
bin/omnibus build metasploit-framework
EOF
chmod +x ./build_docker.sh
/bin/bash -x -c "docker run --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins --entrypoint '' ${BUILD_TAG} /bin/bash -l -c './build_docker.sh'"
/bin/bash -x -c "docker run --rm --volume $(pwd):$(pwd) --workdir $(pwd) --user jenkins --entrypoint '' ${BUILD_TAG} /bin/bash -l -c 'make'"
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.DEFAULT_GOAL := all

.PHONY: all
all:
# install omnibus' dependencies
bundle install
bundle binstubs --all

# build the metasploit-framework package
bin/omnibus build metasploit-framework

.PHONY: clean
clean:
bin/omnibus clean metasploit-framework
3 changes: 2 additions & 1 deletion docker/debian-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ RUN /bin/bash -l -c 'cd ~/ && git clone https://github.com/rapid7/metasploit-omn
cd ~/metasploit-omnibus && bundle install && bundle binstubs --all && cd ~/ && rm -fr metasploit-omnibus'

ENV JENKINS_HOME /home/jenkins
RUN useradd -d "$JENKINS_HOME" -u 1001 -m -s /bin/sh jenkins
RUN id jenkins || useradd -d "$JENKINS_HOME" -u 1001 -m -s /bin/sh jenkins
RUN cp ~/.gitconfig "$JENKINS_HOME"
RUN chown -R jenkins "$JENKINS_HOME"
RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers

RUN mkdir -p /var/cache/omnibus
RUN mkdir -p /opt/metasploit-framework
Expand Down
1 change: 1 addition & 0 deletions docker/debian-armv7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ENV JENKINS_HOME /home/jenkins
RUN useradd -d "$JENKINS_HOME" -u 1001 -m -s /bin/sh jenkins
RUN cp ~/.gitconfig "$JENKINS_HOME"
RUN chown -R jenkins "$JENKINS_HOME"
RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers

RUN mkdir -p /var/cache/omnibus
RUN mkdir -p /opt/metasploit-framework
Expand Down

0 comments on commit 4879d3b

Please sign in to comment.