From 716e48d1989f66563ff3d908379cca55a77cc6cb Mon Sep 17 00:00:00 2001 From: Manel Eljishi Date: Thu, 17 Oct 2024 10:08:37 +0200 Subject: [PATCH] Build elixir image --- .gitlab/.gitlab-ci.elixir.docker.yml | 16 ++++++++++++++++ docker/Dockerfile.elixir | 16 ++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .gitlab/.gitlab-ci.elixir.docker.yml diff --git a/.gitlab/.gitlab-ci.elixir.docker.yml b/.gitlab/.gitlab-ci.elixir.docker.yml new file mode 100644 index 0000000..f7e2864 --- /dev/null +++ b/.gitlab/.gitlab-ci.elixir.docker.yml @@ -0,0 +1,16 @@ +build_docker_javascript: + stage: build + variables: + DOCKERFILE_PATH: $CI_PROJECT_DIR/docker/Dockerfile.elixir + DESTINATION_IMAGE: $CI_REGISTRY_IMAGE/code-pushup-elixir:latest + image: + name: gcr.io/kaniko-project/executor:v1.23.2-debug + entrypoint: [""] + when: manual + script: + - /kaniko/executor + --context ${CI_PROJECT_DIR} + --snapshot-mode=redo + --use-new-run + --dockerfile $DOCKERFILE_PATH + --destination $DESTINATION_IMAGE \ No newline at end of file diff --git a/docker/Dockerfile.elixir b/docker/Dockerfile.elixir index 36dee5d..938c4db 100644 --- a/docker/Dockerfile.elixir +++ b/docker/Dockerfile.elixir @@ -1,4 +1,4 @@ -FROM node:20-bullseye +FROM registry.gitlab.com/ufirstgroup/ufg/code-pushup-plugins/code-pushup-base:latest ENV NODE_PATH=/usr/local/lib/node_modules/ @@ -9,4 +9,16 @@ RUN npm install -g \ "@code-pushup/models@^0.49.0" \ "@code-pushup/eslint-config@^0.8.0" \ "@code-pushup/eslint-plugin@^0.50.0" -RUN npm install -g "@code-pushup/cli@^0.50.0" \ No newline at end of file +RUN npm install -g "@code-pushup/cli@^0.50.0" + +RUN apt-get update && apt-get install -y --no-install-recommends curl git; \ + git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1; \ + /bin/bash -c 'echo -e "\n\n## Configure ASDF \n. $HOME/.asdf/asdf.sh" >> ~/.bashrc'; \ + /bin/bash -c 'echo -e "\n\n## ASDF Bash Completion: \n. $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc'; \ + exec bash; \ + asdf plugin add erlang; \ + asdf plugin add elixir; \ + asdf install erlang 26.1.2;\ + asdf install elixir 1.16.2 \ + asdf global erlang 26.1.2; \ + asdf global elixir 1.16.2; \ No newline at end of file