Closed valentin-dirken closed 3 years ago
Maybe you cloned the git repository with --no-tags
?
only with git clone https://gitlab.inria.fr/belenios/belenios.git
What is the output of git config --list | grep -i tag
?
Hello,
I've followed this methodology : https://docs.gitlab.com/ee/user/project/import/repo_by_url.html
So git clone --bare https://gitlab.inria.fr/belenios/belenios.git
But, I think there is an issue in the : src/platform/version/gen.sh
-ROOT=../../../../..
+ROOT=../../..
VERSION="$(head -n1 $ROOT/VERSION)"
So,
#!/bin/sh
set -e
ROOT=../../..
VERSION="$(head -n1 $ROOT/VERSION)"
if [ -d $ROOT/.git ] && command -v git >/dev/null; then
BUILD=${BUILD:-$(git describe)}
else
DATE=${SOURCE_DATE_EPOCH:-$(date +%s)}
DATE=$(date -u -d @$DATE +%Y%m%d)
BUILD=${BUILD:-$DATE}
fi
if [ -n "$BELENIOS_DEBUG" ]; then
DEBUG=true
else
DEBUG=false
fi
echo "let version = \"$VERSION\""
echo "let build = \"$BUILD\""
echo "let debug = $DEBUG"
Indeed, with the "first" ROOT, I have :
$ make check
make build-debug-tool
make[1]: Entering directory '/builds/vdirken/belenios-test'
BELENIOS_DEBUG=1 dune build --build-dir=_build-debug -p belenios-platform,belenios-platform-native,belenios,belenios-tool
gen src/platform/version/belenios_version.ml (exit 128)
(cd _build-debug/default/src/platform/version && ./gen.sh) > _build-debug/default/src/platform/version/belenios_version.ml
fatal: No names found, cannot describe anything.
make[1]: *** [Makefile:20: build-debug-tool] Error 1
make[1]: Leaving directory '/builds/vdirken/belenios-test'
make: *** [Makefile:25: check] Error 2
With the "new" ROOT
$ make check
make build-debug-tool
make[1]: Entering directory '/builds/vdirken/belenios-test'
BELENIOS_DEBUG=1 dune build --build-dir=_build-debug -p belenios-platform,belenios-platform-native,belenios,belenios-tool
rm -rf _run/tool-debug
dune install --build-dir=_build-debug --destdir=_run/tool-debug --prefix=/ belenios-platform belenios-platform-native belenios belenios-tool 2>/dev/null
make[1]: Leaving directory '/builds/vdirken/belenios-test'
make -C tests/tool check
make[1]: Entering directory '/builds/vdirken/belenios-test/tests/tool'
mkdir -p data
./demo.sh
=-=-= Setup election =-=-=
Do you think this is an issue ? I don't know what is the link with the "git describe" error : (fatal: No names found, cannot describe anything.)
It is true that I wonder why this change of route solves the problem, because a git describe works even if you are in a sub-folder
Kind regards,
Valentin
I do not understand. If you clone with --bare
, then there is no working copy.
When you use gitlab GUI, the git clone is with --bare argument. Do you consider that there is an error with the variable ROOT in the gen.sh?
What do you mean by "use gitlab GUI"?
Hello, https://docs.gitlab.com/ee/user/project/import/repo_by_url.html
You can import your existing repositories by providing the Git URL:
Have you got some information about the ROOT variable ?
Kind regards,
Valentin
I don't understand what you are trying to do.
If you are importing belenios in some new gitlab instance, then fine. There is no building, no script being run, the ROOT variable being (in)correct should not have any importance.
If you are trying to build belenios from a git checkout, then it means you have a regular clone of belenios (not a --bare
one, they do not make sense in this context). What is the output of git tag -l
? What is the output of git config --list | grep -i tag
?
From what you wrote here, the error seems to be missing tags in your clone. Your suggested change to ROOT does not seem to be correct.
Forking this instance might help also - https://gitlab.com/hpaterek/belenios
Hello, I've cloned this repository : https://gitlab.inria.fr/belenios/belenios
The gitlab-ci.yml is :
stages:
build_and_test_with_preinstalled_image: stage: test
Image glondu/beleniosbase:YYYYMMDD-N is built by Dockerfile_base_environment
image: glondu/beleniosbase:20200824-1 script:
Initialize environment
You have this : https://gitlab.inria.fr/belenios/belenios/-/jobs/851414
$ make check make build-debug-tool make[1]: Entering directory '/builds/belenios/belenios' BELENIOS_DEBUG=1 dune build --build-dir=_build-debug -p belenios-platform,belenios-platform-native,belenios,belenios-tool rm -rf _run/tool-debug dune install --build-dir=_build-debug --destdir=_run/tool-debug --prefix=/ belenios-platform belenios-platform-native belenios belenios-tool 2>/dev/null make[1]: Leaving directory '/builds/belenios/belenios' make -C tests/tool check make[1]: Entering directory '/builds/belenios/belenios/tests/tool' mkdir -p data ./demo.sh
I have this error :
`Running with gitlab-runner 13.5.0 (ece86343) on sam-dev-docker oCyD3VJJ Preparing the "docker" executor 02:04 Using Docker executor with image glondu/beleniosbase:20200824-1 ... Pulling docker image glondu/beleniosbase:20200824-1 ... Using docker image sha256:998d10453e7b7391f601d8a5b4505b944aba1c3a91652ede66f3649329681d12 for glondu/beleniosbase:20200824-1 with digest glondu/beleniosbase@sha256:fecfc0082f3a13c448a367f529e8457331303a44f3d353219c75f5e439d6bda4 ... Preparing environment 00:02 Running on runner-ocyd3vjj-project-199-concurrent-0 via ...secret..... Getting source from Git repository 00:01 Fetching changes with git depth set to 50... Reinitialized existing Git repository in /builds/vdirken/belenios-ci/.git/ Checking out 6d004da5 as master... Removing _build-debug/ Removing belenios-platform.install Removing belenios.install Removing src/lib/.merlin Removing src/platform/.merlin Removing src/platform/native/.merlin Removing src/tool/.merlin Skipping Git submodules setup Executing "step_script" stage of the job script 01:39 $ source ~/env.sh $ opam install --yes gettext-camomile [NOTE] It seems you have not updated your repositories for a while. Consider updating them with: opam update The following actions will be performed:
Do you know why I have this ? The code is exactly like your code (no changes).
Kind regards,
Valentin