Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
shiny-k8s
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub
shiny-k8s
Merge requests
!26
Rework image matrix and export
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Rework image matrix and export
rework-image-matrix-and-export
into
docker-images
Overview
0
Commits
14
Pipelines
14
Changes
1
Merged
Bryan BRANCOTTE
requested to merge
rework-image-matrix-and-export
into
docker-images
1 year ago
Overview
0
Commits
14
Pipelines
14
Changes
1
Expand
0
0
Merge request reports
Compare
docker-images
version 11
2295ab78
1 year ago
version 10
c143c845
1 year ago
version 9
ff11628d
1 year ago
version 8
bad56918
1 year ago
version 7
6915ded1
1 year ago
version 6
859df7ad
1 year ago
version 5
2c246e27
1 year ago
version 4
b9e7715e
1 year ago
version 3
a1785afd
1 year ago
version 2
542f948a
1 year ago
version 1
90a9cd86
1 year ago
docker-images (base)
and
latest version
latest version
ab5862a5
14 commits,
1 year ago
version 11
2295ab78
12 commits,
1 year ago
version 10
c143c845
11 commits,
1 year ago
version 9
ff11628d
10 commits,
1 year ago
version 8
bad56918
9 commits,
1 year ago
version 7
6915ded1
8 commits,
1 year ago
version 6
859df7ad
7 commits,
1 year ago
version 5
2c246e27
6 commits,
1 year ago
version 4
b9e7715e
5 commits,
1 year ago
version 3
a1785afd
4 commits,
1 year ago
version 2
542f948a
3 commits,
1 year ago
version 1
90a9cd86
2 commits,
1 year ago
1 file
+
71
−
17
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
71
−
17
Options
@@ -4,6 +4,7 @@ image: docker:24
variables
:
LATEST_UBUNTU_VERSION
:
"
jammy"
LATEST_DEBIAN_VERSION
:
"
bookworm"
@@ -16,7 +17,11 @@ variables:
-
docker --version
-
|
if [ "${LANGUAGE}" == "python" ]; then
LANGUAGE_VERSION="${PYTHON_VERSION}"
if [ "${LATEST_DEBIAN_VERSION}" == "${DEBIAN_VERSION}" ]; then
LANGUAGE_VERSION="${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX}"
else
LANGUAGE_VERSION="${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX}-${DEBIAN_VERSION}"
fi
else
if [ "${LATEST_UBUNTU_VERSION}" == "${UBUNTU_VERSION}" ]; then
LANGUAGE_VERSION="${R_VERSION}"
@@ -38,35 +43,47 @@ variables:
-
apk add gettext
-
envsubst < ./Dockerfile.$LANGUAGE > Dockerfile
# pull the latest build of the targeted version of the current branch
-
docker pull "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:$VERSIONS_TAG" ||
true
-
docker pull "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:$VERSIONS_TAG" ||
true
# pull the latest build of the target version of the main branch
-
docker pull "$CI_REGISTRY_IMAGE/${LANGUAGE}:$VERSIONS_TAG" ||
true
# pull the latest build of this branch
-
docker pull "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:latest" ||
true
-
docker pull "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:latest" ||
true
# build the image while passing commit SHA and versions, and tagging the image with them
-
docker build
--build-arg BUILDKIT_INLINE_CACHE=1
--build-arg R_VERSION
--build-arg SHINY_SERVER_VERSION
--cache-from "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:$VERSIONS_TAG"
--cache-from "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:$VERSIONS_TAG"
--cache-from "$CI_REGISTRY_IMAGE/${LANGUAGE}:$VERSIONS_TAG"
--tag "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:latest"
--tag "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:latest"
--tag "$CI_REGISTRY_IMAGE/${LANGUAGE}:$VERSIONS_TAG"
--tag "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:$VERSIONS_TAG"
--tag "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:$VERSIONS_TAG--$CI_COMMIT_SHORT_SHA"
--tag "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:$VERSIONS_TAG"
--tag "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:$VERSIONS_TAG--$CI_COMMIT_SHORT_SHA"
-f Dockerfile
./
# push image as latest for the current branch
-
docker push "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:latest"
-
docker push "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:latest"
# push image tagged with its versions
-
docker push "$CI_REGISTRY_IMAGE/${LANGUAGE}/$CI_COMMIT_REF_SLUG:$VERSIONS_TAG"
-
IMAGE_PATH="$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG/${LANGUAGE}:$VERSIONS_TAG"
-
docker push "${IMAGE_PATH}"
# push image tagged with its versions and the commit sha (debug purpose)
-
docker push "$CI_REGISTRY_IMAGE/$
{LANGUAGE}/$
CI_COMMIT_REF_SLUG:$VERSIONS_TAG--$CI_COMMIT_SHORT_SHA"
-
docker push "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
/${LANGUAGE}
:$VERSIONS_TAG--$CI_COMMIT_SHORT_SHA"
-
|
if [ "docker-images" == "${CI_COMMIT_REF_SLUG}" ]; then
# push image tagged with its versions
docker push "$CI_REGISTRY_IMAGE/${LANGUAGE}:$VERSIONS_TAG"
IMAGE_PATH="$CI_REGISTRY_IMAGE/${LANGUAGE}:$VERSIONS_TAG"
docker push "${IMAGE_PATH}"
fi
-
IMAGE_PATH="$CI_REGISTRY_IMAGE/${LANGUAGE}:$VERSIONS_TAG"
-
CSV_LINE="${IMAGE_PATH},${UBUNTU_VERSION}${DEBIAN_VERSION},${PYTHON_VERSION}${R_VERSION},${SHINY_SERVER_VERSION}"
-
MD5SUM=$(echo $CSV_LINE | md5sum | head -c 32)
-
mkdir -p image-list-fragments/
-
echo $CSV_LINE > image-list-fragments/${MD5SUM}.csv
artifacts
:
when
:
always
paths
:
-
image-list-fragments
expire_in
:
1 week
@@ -76,12 +93,16 @@ build_python:
matrix
:
-
LANGUAGE
:
[
"
python"
]
PYTHON_VERSION
:
[
"
3.9-slim-bullseye"
,
"
3.9-slim"
,
"
3.10-slim-bullseye"
,
"
3.10-slim"
,
"
3.11-slim-bullseye"
,
"
3.11-slim"
,
"
3.9"
,
"
3.10"
,
"
3.11"
,
]
PYTHON_VERSION_SUFFIX
:
[
"
-slim"
]
DEBIAN_VERSION
:
[
"
bookworm"
,
"
bullseye"
,
]
SHINY_SERVER_VERSION
:
[
"
1.5.21.1006"
,
@@ -113,6 +134,39 @@ build_r:
publish_listing
:
needs
:
-
build_r
-
build_python
image
:
docker:24-git
before_script
:
-
git fetch origin docs
-
git checkout docs
script
:
-
echo "Built image,Base os,R/Python,shiny-server" > image_list.csv
-
cat image-list-fragments/*.csv >> image_list.csv
-
WHEN=$(LC_TIME="en_US.utf8" date +"%b %G")
-
sed "s/%%date%%/${WHEN}/g" source/user_guide/image_list.rst > image_list.rst
artifacts
:
when
:
always
paths
:
-
image_list.csv
-
image_list.rst
expire_in
:
1 year
# update_docs:
# only:
# - docker-images
# - rework-image-matrix-and-export
# needs: []
# trigger:
# - project: hub/shiny-k8s
# branch: docs
trigger_r_example
:
needs
:
[
"
build_r"
]
trigger
:
Loading