mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-09-12 11:40:17 +05:00
Fix and upgrade GitlabCI
This commit is contained in:
parent
1d7a5ca8b0
commit
c418d75609
@ -12,7 +12,7 @@
|
||||
## To run the container
|
||||
# docker run -it -p 127.0.0.1:9092:9092 "${CI_REGISTRY_IMAGE}" retroshare-service --jsonApiPort 9092 --jsonApiBindAddress 0.0.0.0
|
||||
|
||||
FROM ubuntu:22.04
|
||||
FROM ubuntu:26.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV APT_UNAT="--assume-yes --quiet"
|
||||
@ -26,7 +26,7 @@ RUN apt-get update $APT_UNAT && \
|
||||
libsqlite3-dev libsqlcipher-dev \
|
||||
pkg-config libz-dev \
|
||||
libxapian-dev doxygen rapidjson-dev \
|
||||
git cmake curl python3
|
||||
git cmake curl python3 libasio-dev libjson-c-dev libbotan-3-dev
|
||||
|
||||
## Avoid git cloning spuriously failing with
|
||||
# server certificate verification failed. CAfile: none CRLfile: none
|
||||
@ -48,11 +48,7 @@ RUN git clone $REPO_DEPTH $REPO_URL -b $REPO_BRANCH && \
|
||||
git fetch --tags && \
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ \
|
||||
supportlibs/restbed/ && \
|
||||
cd supportlibs/restbed/ && \
|
||||
git submodule update --init \
|
||||
dependency/asio/ dependency/kashmir/ && \
|
||||
cd ../../../
|
||||
supportlibs/restbed/
|
||||
|
||||
RUN \
|
||||
mkdir RetroShare-build && cd RetroShare-build && \
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -n "$CI_MERGE_REQUEST_ID" ] &&
|
||||
echo \
|
||||
--build-arg REPO_URL="$CI_MERGE_REQUEST_SOURCE_PROJECT_URL" \
|
||||
--build-arg REPO_BRANCH="$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" ||
|
||||
echo \
|
||||
--build-arg REPO_URL="$CI_REPOSITORY_URL" \
|
||||
--build-arg REPO_BRANCH="$CI_COMMIT_BRANCH"
|
||||
# Emit --build-arg flags so gitlabCI.Dockerfile fetches the EXACT ref that
|
||||
# triggered the pipeline. REPO_REF can be a commit SHA (the CI default), a
|
||||
# branch name, or a tag. The remote URL is still chosen per-case so
|
||||
# MR-from-fork fetches from the fork.
|
||||
|
||||
if [ -n "$CI_MERGE_REQUEST_ID" ]; then
|
||||
REPO_URL="$CI_MERGE_REQUEST_SOURCE_PROJECT_URL"
|
||||
else
|
||||
REPO_URL="$CI_REPOSITORY_URL"
|
||||
fi
|
||||
|
||||
echo \
|
||||
--build-arg REPO_URL="$REPO_URL" \
|
||||
--build-arg REPO_REF="$CI_COMMIT_SHA"
|
||||
|
||||
@ -3,13 +3,15 @@ FROM registry.gitlab.com/retroshare/retroshare:base
|
||||
RUN apt-get update -y && apt-get upgrade -y
|
||||
|
||||
ARG REPO_URL=https://github.com/RetroShare/RetroShare.git
|
||||
ARG REPO_BRANCH=master
|
||||
ARG REPO_REF=master
|
||||
RUN \
|
||||
cd RetroShare && git remote add testing $REPO_URL && \
|
||||
git fetch --tags testing $REPO_BRANCH && \
|
||||
git reset --hard testing/$REPO_BRANCH && \
|
||||
git fetch --tags testing $REPO_REF && \
|
||||
git checkout --force FETCH_HEAD && \
|
||||
git submodule deinit -f --all && \
|
||||
git submodule update --init \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ && \
|
||||
libbitdht/ libretroshare/ openpgpsdk/ retroshare-webui/ \
|
||||
supportlibs/restbed/ && \
|
||||
git --no-pager log --max-count 1
|
||||
RUN \
|
||||
mkdir RetroShare-build && cd RetroShare-build && \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user