mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
scripts: Add a dockerfile to build review images
This automates the review process of a given PR by checking out the current HEAD of the given PR and installing TW in a container.
This commit is contained in:
parent
3d850715f4
commit
522ef20a85
1 changed files with 36 additions and 0 deletions
36
scripts/review-dockerfile
Normal file
36
scripts/review-dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Dockerfile for containers to perform PR review in
|
||||||
|
# Use with make as follows: make PR=1234 review
|
||||||
|
|
||||||
|
FROM centos:8
|
||||||
|
|
||||||
|
RUN dnf update -y
|
||||||
|
RUN yum install epel-release -y
|
||||||
|
RUN dnf install python38 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime sudo man -y
|
||||||
|
|
||||||
|
RUN useradd warrior
|
||||||
|
RUN echo warrior ALL=NOPASSWD:ALL > /etc/sudoers.d/warrior
|
||||||
|
|
||||||
|
USER warrior
|
||||||
|
WORKDIR /home/warrior/
|
||||||
|
|
||||||
|
# Setup taskwarrior
|
||||||
|
# The purpose is to speed up subsequent re-installs due to Docker layer caching
|
||||||
|
RUN git clone https://github.com/GothenburgBitFactory/taskwarrior.git
|
||||||
|
WORKDIR /home/warrior/taskwarrior/
|
||||||
|
RUN git submodule init
|
||||||
|
RUN git submodule update
|
||||||
|
RUN cmake -DCMAKE_BUILD_TYPE=debug .
|
||||||
|
RUN make -j8
|
||||||
|
RUN sudo make install
|
||||||
|
|
||||||
|
# Install from the PR's branch
|
||||||
|
ARG PR
|
||||||
|
ADD https://github.com/GothenburgBitFactory/taskwarrior/pull/${PR}.patch .
|
||||||
|
RUN git fetch origin refs/pull/${PR}/head:pr-${PR}
|
||||||
|
RUN git checkout pr-${PR}
|
||||||
|
RUN cmake -DCMAKE_BUILD_TYPE=debug .
|
||||||
|
RUN make -j8
|
||||||
|
RUN sudo make install
|
||||||
|
|
||||||
|
WORKDIR /home/warrior
|
||||||
|
RUN task rc.confirmation=0 _ids || : # Generate default taskrc
|
Loading…
Add table
Add a link
Reference in a new issue