Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
fb109e70
Commit
fb109e70
authored
Feb 12, 2024
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forge v3.3 garg image
parent
a33a195f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
19 deletions
+98
-19
install-cabal2stack
bin/install-cabal2stack
+25
-0
setup-ci-environment
bin/setup-ci-environment
+7
-0
update-project-dependencies
bin/update-project-dependencies
+9
-17
Dockerfile
devops/docker/Dockerfile
+57
-2
No files found.
bin/install-cabal2stack
0 → 100644
View file @
fb109e70
#!/usr/bin/env bash
set
-euxo
pipefail
current_dir
=
$(
basename
"
$PWD
"
)
if
[
"
$current_dir
"
==
"bin"
]
;
then
source
./setup-ci-environment
else
source
./bin/setup-ci-environment
fi
cabal
--store-dir
=
$STORE_DIR
v2-update
"hackage.haskell.org,
${
INDEX_STATE
}
"
# Install cabal2stack if it can't be found.
if
!
cabal2stack
--help
&> /dev/null
then
echo
"cabal2stack could not be found"
CURDIR
=
$PWD
git clone https://github.com/iconnect/cabal2stack.git cabal2stack-installer
cd
cabal2stack-installer
cabal
--store-dir
=
$STORE_DIR
v2-install
--index-state
=
"
${
INDEX_STATE
}
"
--overwrite-policy
=
always
cd
$CURDIR
rm
-rf
cabal2stack-installer
fi
bin/setup-ci-environment
0 → 100644
View file @
fb109e70
#!/usr/bin/env bash
set
-euxo
pipefail
DEFAULT_STORE
=
$HOME
/.cabal
STORE_DIR
=
"
${
1
:-
$DEFAULT_STORE
}
"
INDEX_STATE
=
"2023-12-10T10:34:46Z"
bin/update-project-dependencies
View file @
fb109e70
...
@@ -2,9 +2,15 @@
...
@@ -2,9 +2,15 @@
set
-euxo
pipefail
set
-euxo
pipefail
DEFAULT_STORE
=
$HOME
/.cabal
current_dir
=
$(
basename
"
$PWD
"
)
STORE_DIR
=
"
${
1
:-
$DEFAULT_STORE
}
"
INDEX_STATE
=
"2023-12-10T10:34:46Z"
if
[
"
$current_dir
"
==
"bin"
]
;
then
source
./setup-ci-environment
./install-cabal2stack
else
source
./bin/setup-ci-environment
./bin/install-cabal2stack
fi
# README!
# README!
# Every time you modify the `cabal.project`, you have to make sure to update
# Every time you modify the `cabal.project`, you have to make sure to update
...
@@ -15,20 +21,6 @@ INDEX_STATE="2023-12-10T10:34:46Z"
...
@@ -15,20 +21,6 @@ INDEX_STATE="2023-12-10T10:34:46Z"
expected_cabal_project_hash
=
"3f5d6b7f26cac4aa5a7f87ba0227a7671041dfe46643ddef79512eb49bd876ec"
expected_cabal_project_hash
=
"3f5d6b7f26cac4aa5a7f87ba0227a7671041dfe46643ddef79512eb49bd876ec"
expected_cabal_project_freeze_hash
=
"745c65c246998cfda4d2a7a22df44a9f1f7fb0927e2afc2f16712861bf552c76"
expected_cabal_project_freeze_hash
=
"745c65c246998cfda4d2a7a22df44a9f1f7fb0927e2afc2f16712861bf552c76"
cabal
--store-dir
=
$STORE_DIR
v2-update
"hackage.haskell.org,
${
INDEX_STATE
}
"
# Install cabal2stack if it can't be found.
if
!
cabal2stack
--help
&> /dev/null
then
echo
"cabal2stack could not be found"
CURDIR
=
$PWD
git clone https://github.com/iconnect/cabal2stack.git cabal2stack-installer
cd
cabal2stack-installer
cabal
--store-dir
=
$STORE_DIR
v2-install
--index-state
=
"
${
INDEX_STATE
}
"
--overwrite-policy
=
always
cd
$CURDIR
rm
-rf
cabal2stack-installer
fi
cabal
--store-dir
=
$STORE_DIR
v2-build
--dry-run
cabal
--store-dir
=
$STORE_DIR
v2-build
--dry-run
cabal2stack
--system-ghc
--allow-newer
--resolver
lts-21.17
--resolver-file
devops/stack/lts-21.17.yaml
-o
stack.yaml
cabal2stack
--system-ghc
--allow-newer
--resolver
lts-21.17
--resolver-file
devops/stack/lts-21.17.yaml
-o
stack.yaml
cabal
--store-dir
=
$STORE_DIR
v2-freeze
cabal
--store-dir
=
$STORE_DIR
v2-freeze
...
...
devops/docker/Dockerfile
View file @
fb109e70
FROM
adinapoli/gargantext:v3.1
FROM
ubuntu:noble
## NOTA BENE: In order for this to be built successfully, you have to run ./devops/coreNLP/build.sh first.
## NOTA BENE: In order for this to be built successfully, you have to run ./devops/coreNLP/build.sh first.
ARG
DEBIAN_FRONTEND=noninteractive
ARG
DEBIAN_FRONTEND=noninteractive
ARG
GHC=9.4.7
ARG
CORENLP=4.5.4
ARG
CORE
COPY
./shell.nix /builds/gargantext/shell.nix
COPY
./shell.nix /builds/gargantext/shell.nix
COPY
./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix
COPY
./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix
COPY
./nix/pinned-23.11.nix /builds/gargantext/nix/pinned-23.11.nix
COPY
./nix/pinned-23.11.nix /builds/gargantext/nix/pinned-23.11.nix
COPY
./devops/coreNLP/build.sh /root/devops/coreNLP/build.sh
COPY
./devops/coreNLP/build.sh /root/devops/coreNLP/build.sh
COPY
./devops/coreNLP/startServer.sh /root/devops/coreNLP/startServer.sh
COPY
./devops/coreNLP/startServer.sh /root/devops/coreNLP/startServer.sh
COPY
./bin/setup-ci-environment /builds/gargantext/bin/setup-ci-environment
COPY
./bin/install-cabal2stack /builds/gargantext/bin/install-cabal2stack
ENV
TZ=Europe/Rome
ENV
TZ=Europe/Rome
RUN
apt-get update
&&
\
apt-get
install
--no-install-recommends
-y
\
apt-transport-https
\
autoconf
\
automake
\
build-essential
\
ca-certificates
\
curl
\
gcc
\
git
\
gnupg2
\
libffi-dev
\
libffi8
\
libgmp-dev
\
libgmp10
\
libncurses-dev
\
libncurses6
\
libnuma-dev
\
libtinfo6
\
locales
\
lsb-release
\
software-properties-common
\
strace
\
sudo
\
wget
\
vim
\
xz-utils
\
zlib1g-dev
\
openjdk-21-jdk
\
unzip
&&
\
apt-get clean
&&
rm
-rf
/var/lib/apt/lists/
*
&&
\
mkdir
-m
0755 /nix
&&
groupadd
-r
nixbld
&&
chown
root /nix
&&
\
for
n
in
$(
seq
1 10
)
;
do
useradd
-c
"Nix build user
$n
"
-d
/var/empty
-g
nixbld
-G
nixbld
-M
-N
-r
-s
"
$(
command
-v
nologin
)
"
"nixbld
$n
"
;
done
RUN
gpg
--batch
--keyserver
keys.openpgp.org
--recv-keys
7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C
&&
\
gpg
--batch
--keyserver
keyserver.ubuntu.com
--recv-keys
FE5AB6C91FEA597C3B31180B73EDE9E8CFBAEF01
SHELL
["/bin/bash", "-o", "pipefail", "-c"]
SHELL
["/bin/bash", "-o", "pipefail", "-c"]
RUN
cd
/root/devops/coreNLP
;
./build.sh
RUN
set
-o
pipefail
&&
\
bash <
(
curl
-L
https://releases.nixos.org/nix/nix-2.15.0/install
)
--no-daemon
&&
\
locale-gen en_US.UTF-8
&&
chown
root
-R
/nix
ENV
LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
ENV
LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
ENV
USER=root
ENV
USER=root
ENV
SHELL /bin/bash
ENV
SHELL /bin/bash
RUN
.
"
$HOME
/.nix-profile/etc/profile.d/nix.sh"
&&
\
mkdir
-p
"/builds/gargantext/"
&&
chmod
777
-R
"/builds/gargantext"
&&
\
echo
"source
$HOME
/.nix-profile/etc/profile.d/nix.sh"
>>
"
$HOME
/.bashrc"
&&
\
echo
`
which nix-env
`
ENV
PATH=/root/.nix-profile/bin:$PATH
ENV
PATH=/root/.nix-profile/bin:$PATH
RUN
.
$HOME
/.bashrc
&&
nix-env
--version
ENV
PATH=/root/.local/bin:$PATH
ENV
PATH=/root/.local/bin:$PATH
RUN
cd
/builds/gargantext
&&
nix-shell
RUN
cd
/builds/gargantext
&&
nix-shell
--run
"./bin/install-cabal2stack"
WORKDIR
"/builds/gargantext/"
WORKDIR
"/builds/gargantext/"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment