Update .gitlab-ci.yml

This commit is contained in:
Fifo F. 2024-06-10 18:35:16 +00:00
parent cceabb328c
commit d0998ad774

View file

@ -3,7 +3,7 @@ stages:
- push
variables:
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/sharelatex
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/sharelatex:with_texlive_full
ARCHIVED_IMAGE: sharelatex_with_texlive_full.tar
TEXLIVE_REPO: https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2023/tlnet-final
@ -15,17 +15,9 @@ build:
services:
- name: docker:24.0.5-dind
script:
# Pull the latest ShareLaTeX/Overleaf Docker image
- docker pull sharelatex/sharelatex:latest
# Run the TeX Live installation inside the Docker container, specifying the 2023 repository
- docker run --name temp --entrypoint /bin/bash sharelatex/sharelatex:latest -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full"
# Commit the changes to the Docker container
- docker commit temp sharelatex:with-texlive-full
# Tag the new image for GitLab registry
# - docker tag sharelatex:with-texlive-full $IMAGE_NAME:latest
- docker commit temp $IMAGE_NAME
- docker save -o $ARCHIVED_IMAGE sharelatex:with-texlive-full
artifacts:
@ -42,14 +34,9 @@ push:
dependencies:
- build
script:
# Login to the GitLab registry
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
# Load the Docker image from the previous stage
- docker load -i $ARCHIVED_IMAGE
# Push the customized image to the GitLab registry
- docker push $IMAGE_NAME:latest
- docker push $IMAGE_NAME
artifacts:
paths:
- $ARCHIVED_IMAGE