{"thread":{"id":"55391","subject":"[PATCH v1 0/1] ci: facilitate dev to mimic a CI environment","startedAt":"2021-03-26T17:06:22Z","lastAt":"2021-03-27T09:10:29Z","messageCount":4,"participants":["Σταύρος Ντέντος","Bagas Sanjaya","Stavros Ntentos"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"420274","messageId":"20210326170505.7771-1-stdedos+git@gmail.com","threadId":"55391","inReplyTo":null,"subject":"[PATCH v1 0/1] ci: facilitate dev to mimic a CI environment","fromName":"Σταύρος Ντέντος","fromEmail":"stdedos@gmail.com","sentAt":"2021-03-26T17:05:04Z","receivedAt":"2021-03-26T17:06:22Z","isPatch":true,"sender":{"key":"stdedos@gmail.com","avatar":null},"body":"From: Stavros Ntentos <133706+stdedos@users.noreply.github.com>\n\nWhile trying to mimic a CI environment (to be able to\nlocally run tests in isolation), I didn't find enough\ninstructions how to do so - even though the project has CI set up.\n\nAttempt to bridge the gap, by providing a starting/discussion point.\n\nStavros Ntentos (1):\n  ci: facilitate dev to mimic a CI environment\n\n .../setup-local-dev-environment-docker.sh     | 43 +++++++++++++++++++\n ci/setup-local-dev-environment-docker.sh      |  1 +\n 2 files changed, 44 insertions(+)\n create mode 100644 Documentation/howto/setup-local-dev-environment-docker.sh\n create mode 120000 ci/setup-local-dev-environment-docker.sh\n\n--\n2.31.0\n\n"},{"id":"420275","messageId":"20210326170505.7771-2-stdedos+git@gmail.com","threadId":"55391","inReplyTo":"20210326170505.7771-1-stdedos+git@gmail.com","subject":"[PATCH v1 1/1] ci: facilitate dev to mimic a CI environment","fromName":"Σταύρος Ντέντος","fromEmail":"stdedos@gmail.com","sentAt":"2021-03-26T17:05:05Z","receivedAt":"2021-03-26T17:06:22Z","isPatch":true,"sender":{"key":"stdedos@gmail.com","avatar":null},"body":"From: Stavros Ntentos <133706+stdedos@users.noreply.github.com>\n\nWhile trying to mimic a CI environment (to be able to\nlocally run tests in isolation), I didn't find enough\ninstructions how to do so - even though the project has CI set up.\n\nAttempt to bridge the gap, by providing a starting/discussion point.\n\nLeave instructions for people that want to\nrun a ci-like isolated environment locally.\n---\n .../setup-local-dev-environment-docker.sh     | 43 +++++++++++++++++++\n ci/setup-local-dev-environment-docker.sh      |  1 +\n 2 files changed, 44 insertions(+)\n create mode 100644 Documentation/howto/setup-local-dev-environment-docker.sh\n create mode 120000 ci/setup-local-dev-environment-docker.sh\n\ndiff --git a/Documentation/howto/setup-local-dev-environment-docker.sh b/Documentation/howto/setup-local-dev-environment-docker.sh\nnew file mode 100644\nindex 0000000000..265602ea55\n--- /dev/null\n+++ b/Documentation/howto/setup-local-dev-environment-docker.sh\n@@ -0,0 +1,43 @@\n+#!/bin/false\n+\n+# shellcheck shell=sh\n+\n+# Partially based on instructions from:\n+# ci/run-docker.sh\n+#\n+# Note: Alpine (and consequently the other variant [\"non-32-bit\"]) complains of:\n+# git-compat-util.h:  1139:\t#error \"Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd\"\n+# and no\n+# ```bash\n+# export NO_REGEX=NeedsStartEnd\n+# /usr/src/git/ci/run-docker-build.sh 0\n+# ```\n+# helps\n+\n+docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash \"daald/ubuntu32:xenial\"\n+\n+# And then, inside, initialize with:\n+\n+export jobname=Linux32\n+\n+# Helpful initializations:\n+\n+cat >> ~/.gdbinit <<\"EOF\"\n+# https://stackoverflow.com/a/3176802/2309247\n+set history save on\n+set history size -1\n+set history filename ~/.gdb_history\n+EOF\n+chmod 600 ~/.gdbinit\n+\n+# cd to repo\n+\n+cd /usr/src/git/ || echo \"cd error!\"\n+\n+# In lieu of `$ make`:\n+ci/run-docker-build.sh 0\n+\n+# # And then run a test with:\n+# prove t/t6130-pathspec-noglob.sh\n+# t/t6130-pathspec-noglob.sh\n+# ci/run-docker-build.sh 0 && prove t/t6130-pathspec-noglob.sh\ndiff --git a/ci/setup-local-dev-environment-docker.sh b/ci/setup-local-dev-environment-docker.sh\nnew file mode 120000\nindex 0000000000..1c4bcc90a9\n--- /dev/null\n+++ b/ci/setup-local-dev-environment-docker.sh\n@@ -0,0 +1 @@\n+../Documentation/howto/setup-local-dev-environment-docker.sh\n\\ No newline at end of file\n--\n2.31.0\n\n"},{"id":"420294","messageId":"5196a86c-1153-8998-a8cb-c8bd20687150@gmail.com","threadId":"55391","inReplyTo":"20210326170505.7771-2-stdedos+git@gmail.com","subject":"Re: [PATCH v1 1/1] ci: facilitate dev to mimic a CI environment","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-03-27T06:52:01Z","receivedAt":"2021-03-27T06:52:52Z","isPatch":true,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 27/03/21 00.05, Σταύρος Ντέντος wrote:\n> diff --git a/Documentation/howto/setup-local-dev-environment-docker.sh b/Documentation/howto/setup-local-dev-environment-docker.sh\n> new file mode 100644\n> index 0000000000..265602ea55\n> --- /dev/null\n> +++ b/Documentation/howto/setup-local-dev-environment-docker.sh\n> @@ -0,0 +1,43 @@\n> +#!/bin/false\nWait, why did you make this documentation /bin/false script? I think\nit is better to be in Asciidoc format (.txt)\n> +# shellcheck shell=sh\n> +\n> +# Partially based on instructions from:\n> +# ci/run-docker.sh\n> +#\n> +# Note: Alpine (and consequently the other variant [\"non-32-bit\"]) complains of:\n> +# git-compat-util.h:  1139:\t#error \"Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd\"\n> +# and no\n> +# ```bash\n> +# export NO_REGEX=NeedsStartEnd\n> +# /usr/src/git/ci/run-docker-build.sh 0\n> +# ```\n> +# helps\n> +\n> +docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash \"daald/ubuntu32:xenial\"\n> +\n> +# And then, inside, initialize with:\n> +\n> +export jobname=Linux32\n> +\n> +# Helpful initializations:\n> +\n> +cat >> ~/.gdbinit <<\"EOF\"\n> +# https://stackoverflow.com/a/3176802/2309247\n> +set history save on\n> +set history size -1\n> +set history filename ~/.gdb_history\n> +EOF\n> +chmod 600 ~/.gdbinit\n> +\n> +# cd to repo\n> +\n> +cd /usr/src/git/ || echo \"cd error!\"\n> +\n> +# In lieu of `$ make`:\n> +ci/run-docker-build.sh 0\n> +\n> +# # And then run a test with:\n> +# prove t/t6130-pathspec-noglob.sh\n> +# t/t6130-pathspec-noglob.sh\n> +# ci/run-docker-build.sh 0 && prove t/t6130-pathspec-noglob.sh\n> diff --git a/ci/setup-local-dev-environment-docker.sh b/ci/setup-local-dev-environment-docker.sh\n> new file mode 120000\n> index 0000000000..1c4bcc90a9\n> --- /dev/null\n> +++ b/ci/setup-local-dev-environment-docker.sh\n> @@ -0,0 +1 @@\n> +../Documentation/howto/setup-local-dev-environment-docker.sh\n> \\ No newline at end of file\n> --\n> 2.31.0\n> \n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"420297","messageId":"20210327090813.7847-1-133706+stdedos@users.noreply.github.com","threadId":"55391","inReplyTo":"5196a86c-1153-8998-a8cb-c8bd20687150@gmail.com","subject":"Re: [PATCH v1 1/1] ci: facilitate dev to mimic a CI environment","fromName":"Stavros Ntentos","fromEmail":"stdedos@gmail.com","sentAt":"2021-03-27T09:08:13Z","receivedAt":"2021-03-27T09:10:29Z","isPatch":true,"sender":{"key":"stdedos@gmail.com","avatar":null},"body":"> > diff --git a/Documentation/howto/setup-local-dev-environment-docker.sh b/Documentation/howto/setup-local-dev-environment-docker.sh\n> > new file mode 100644\n> > index 0000000000..265602ea55\n> > --- /dev/null\n> > +++ b/Documentation/howto/setup-local-dev-environment-docker.sh\n> > @@ -0,0 +1,43 @@\n> > +#!/bin/false\n> Wait, why did you make this documentation /bin/false script? I think\n> it is better to be in Asciidoc format (.txt)\n\nMy full intention was to actually _create_ a script that would put a\nwanna-be developer (me) from (a) looking at my terminal inside git/,\nto (b) have a ci-like environment, inside an abstraction layer (docker)\nwith linked sources (i.e. the \"${PWD}:/usr/src/git\" part).\n\nHowever, the way sources and docker invocation are defined, I find it hard\nto create \"the script\". Also because (again) my docker knowledge is limited.\n\nI want future nitpick-fixers (hopefully with more docker experience),\nto look at this script with such agenda in mind - and not to \"just\"\ndocument their findings alongside mine.\n\n`#!/bin/false` is simply my way of saying \"it's not ready to be run yet\",\nand I used `.sh` to get formatting / syntax highlighting cheaper than\nrunning a fully-fledged .md file.\n\nIf you still insist it's no good as a \".sh\",\nmy intention would be to make it .md (to get some formatting in it).\n"}]}