containerized-rpmbuild: set starting directory based on mode (#6124)
This commit is contained in:
Родитель
0f3b1cdc32
Коммит
12a3deea7d
|
@ -229,6 +229,7 @@ docker build -q \
|
|||
--build-arg version="$version" \
|
||||
--build-arg enable_local_repo="$enable_local_repo" \
|
||||
--build-arg mariner_repo="$repo_path" \
|
||||
--build-arg mode="$mode" \
|
||||
.
|
||||
|
||||
echo "docker_image_tag is ${docker_image_tag}"
|
||||
|
|
|
@ -3,6 +3,7 @@ FROM ${container_img}
|
|||
ARG version
|
||||
ARG enable_local_repo
|
||||
ARG mariner_repo
|
||||
ARG mode
|
||||
LABEL containerized-rpmbuild=$mariner_repo/build
|
||||
|
||||
COPY resources/local_repo /etc/yum.repos.d/local_repo.disabled_repo
|
||||
|
@ -15,8 +16,10 @@ RUN echo "alias tdnf='tdnf --releasever=$version'" >> /root/.bashr
|
|||
RUN if [[ "${enable_local_repo}" == "true" ]]; then echo "enable_local_repo" >> /root/.bashrc; fi
|
||||
|
||||
RUN echo "cat /mariner_setup_dir/splash.txt" >> /root/.bashrc && \
|
||||
echo "show_help" >> /root/.bashrc && \
|
||||
echo "cd /usr/src/mariner/ || { echo \"ERROR: Could not change directory to /usr/src/mariner/ \"; exit 1; }" >> /root/.bashrc
|
||||
echo "show_help" >> /root/.bashrc
|
||||
|
||||
RUN if [[ "${mode}" == "build" ]]; then echo "cd /usr/src/mariner || { echo \"ERROR: Could not change directory to /usr/src/mariner \"; exit 1; }" >> /root/.bashrc; fi
|
||||
RUN if [[ "${mode}" == "test" ]]; then echo "cd /mnt || { echo \"ERROR: Could not change directory to /mnt \"; exit 1; }" >> /root/.bashrc; fi
|
||||
|
||||
# Install vim & git in the build env
|
||||
RUN tdnf --releasever=$version install -y vim git
|
||||
|
|
Загрузка…
Ссылка в новой задаче