mirror of
https://git.fifo-f.eu/tex-projects/docker-images.git
synced 2025-04-19 13:08:04 +02:00
Update .gitlab-ci.yml: (try to) add versioning to the images
This commit is contained in:
parent
5111dca842
commit
40aeb7c313
1 changed files with 11 additions and 5 deletions
|
@ -3,7 +3,7 @@ stages:
|
|||
- push
|
||||
|
||||
variables:
|
||||
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/sharelatex:with-texlive-full
|
||||
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
|
||||
IMAGE_ENTRYPOINT: "/sbin/my_init"
|
||||
|
@ -18,14 +18,18 @@ build:
|
|||
script:
|
||||
- |
|
||||
if [ ! -f $ARCHIVED_IMAGE ]; then
|
||||
curl -sSfL https://raw.githubusercontent.com/overleaf/toolkit/master/lib/config-seed/version -o version.txt
|
||||
OVERLEAF_VERSION=$(cat version.txt)
|
||||
docker pull sharelatex/sharelatex:latest
|
||||
docker run --name temp --entrypoint /bin/bash sharelatex/sharelatex:latest -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full"
|
||||
docker commit --change "ENTRYPOINT $IMAGE_ENTRYPOINT" temp $IMAGE_NAME
|
||||
docker save -o $ARCHIVED_IMAGE $IMAGE_NAME
|
||||
docker commit --change "ENTRYPOINT $IMAGE_ENTRYPOINT" temp $IMAGE_NAME:$OVERLEAF_VERSION
|
||||
docker tag $IMAGE_NAME:$OVERLEAF_VERSION $IMAGE_NAME:latest
|
||||
docker save -o $ARCHIVED_IMAGE $IMAGE_NAME:$OVERLEAF_VERSION $IMAGE_NAME:latest
|
||||
fi
|
||||
artifacts:
|
||||
paths:
|
||||
- $ARCHIVED_IMAGE
|
||||
- version.txt
|
||||
expire_in: 7 days
|
||||
|
||||
push:
|
||||
|
@ -40,8 +44,10 @@ push:
|
|||
script:
|
||||
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||
- docker load -i $ARCHIVED_IMAGE
|
||||
- docker push $IMAGE_NAME
|
||||
- docker push $IMAGE_NAME:$OVERLEAF_VERSION
|
||||
- docker push $IMAGE_NAME:latest
|
||||
artifacts:
|
||||
paths:
|
||||
- $ARCHIVED_IMAGE
|
||||
expire_in: 7 days
|
||||
- version.txt
|
||||
expire_in: 7 days
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue