Skip to content

Commit 7a02449

Browse files
authored
Merge pull request #770 from rstudio/dev
Merge dev to main
2 parents 21a5cbb + 801583a commit 7a02449

13 files changed

+96
-60
lines changed

.github/workflows/build-manual.yaml

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ on:
1616
options:
1717
- connect
1818
- connect-content-init
19-
- content-images
2019
- package-manager
2120
- r-session-complete
2221
- workbench
@@ -48,12 +47,9 @@ jobs:
4847
name: Setup
4948
runs-on: ubuntu-latest
5049

51-
concurrency:
52-
group: bake-setup-${{ github.ref }}
53-
cancel-in-progress: true
54-
5550
outputs:
56-
GIT_SHA: ${{ steps.checkout.outputs.sha }}
51+
GIT_SHA: ${{ steps.get-git-sha.outputs.GIT_SHA }}
52+
BAKE_FILE: ${{ steps.bake-file.outputs.BAKE_FILE }}
5753

5854
steps:
5955
- name: Checkout
@@ -63,9 +59,22 @@ jobs:
6359
id: get-git-sha
6460
run: |
6561
GIT_SHA=$(git rev-parse --short HEAD)
62+
echo "Setting GIT_SHA=$GIT_SHA"
6663
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT
6764
65+
- name: Set BAKE_FILE
66+
id: bake-file
67+
run: |
68+
if [[ "${{ inputs.type }}" == "release" ]]; then
69+
BAKE_FILE="docker-bake.hcl"
70+
else
71+
BAKE_FILE="docker-bake.preview.hcl"
72+
fi
73+
echo "Using $BAKE_FILE"
74+
echo "BAKE_FILE=$BAKE_FILE" >> $GITHUB_OUTPUT
75+
6876
build:
77+
needs: [setup]
6978
runs-on: ubuntu-latest-4x
7079
name: manual-build
7180

@@ -95,15 +104,48 @@ jobs:
95104
run: |
96105
pip install requests
97106
107+
- name: Get Target
108+
id: get-target
109+
shell: bash
110+
run: |
111+
# Append suffix if necessary
112+
target="${{ inputs.product }}"
113+
if [[ "${{ inputs.type }}" != "release" ]]; then
114+
target="${{ inputs.product }}-${{ inputs.type }}"
115+
fi
116+
echo "Setting TARGET=$target"
117+
echo "TARGET=$target" >> $GITHUB_OUTPUT
118+
98119
- name: Get Version
99120
id: get-version
121+
shell: bash
100122
run: |
123+
# Determine how to set the version
101124
if [[ "${{ inputs.version }}" == "auto" ]]; then
102125
VERSION=`just -f ci.Justfile get-version ${{ inputs.product }} --type=${{ inputs.type }} --local`
103126
else
104127
VERSION="${{ inputs.version }}"
105128
fi
106-
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
129+
130+
# Set the appropriate env var
131+
suffix="_VERSION"
132+
if [[ "${{ inputs.type }}" == "preview" ]]; then
133+
suffix="_PREVIEW_VERSION"
134+
elif [[ "${{ inputs.type }}" == "daily" ]]; then
135+
suffix="_DAILY_VERSION"
136+
fi
137+
138+
product="${{ inputs.product }}"
139+
if [[ "$product" == "connect" ]] || [[ "$product" == "connect-content-init" ]] || [[ "$product" == "content-images" ]]; then
140+
product="CONNECT"
141+
elif [[ "$product" == "package-manager" ]]; then
142+
product="PACKAGE_MANAGER"
143+
else
144+
product="WORKBENCH"
145+
fi
146+
147+
echo "Setting $product$suffix=$VERSION"
148+
echo "$product$suffix=$VERSION" >> $GITHUB_ENV
107149
108150
- name: Set up Docker Buildx
109151
uses: docker/setup-buildx-action@v3
@@ -114,10 +156,10 @@ jobs:
114156
- name: Build/Test/Push manual build image
115157
uses: ./.github/actions/bake-test-push
116158
with:
117-
target: ${{ inputs.product }}
159+
target: ${{ steps.get-target.outputs.TARGET }}
160+
bakefile: ${{ needs.setup.outputs.BAKE_FILE }}
118161
push-image: ${{ inputs.push }}
119162
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
120163
dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
121164
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
122165
gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'
123-

docker-bake.hcl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ variable BASE_BUILD_MATRIX {
100100
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"},
101101
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.17", py_alternate = "3.8.17"},
102102
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
103+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
103104
]
104105
}
105106
}
@@ -166,15 +167,15 @@ variable CONTENT_BUILD_MATRIX {
166167
variable R_SESSION_COMPLETE_BUILD_MATRIX {
167168
default = {
168169
builds = [
169-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"},
170+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
170171
]
171172
}
172173
}
173174

174175
variable WORKBENCH_BUILD_MATRIX {
175176
default = {
176177
builds = [
177-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.9.14", py_alternate = "3.8.15"},
178+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
178179
]
179180
}
180181
}

docker-bake.preview.hcl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ variable BRANCH {
44
}
55

66
variable CONNECT_DAILY_VERSION {
7-
default = null
7+
default = ""
88
}
99

1010
variable PACKAGE_MANAGER_PREVIEW_VERSION {
11-
default = null
11+
default = ""
1212
}
1313

1414
variable PACKAGE_MANAGER_DAILY_VERSION {
15-
default = null
15+
default = ""
1616
}
1717

1818
variable WORKBENCH_DAILY_VERSION {
19-
default = null
19+
default = ""
2020
}
2121

2222
variable WORKBENCH_PREVIEW_VERSION {
23-
default = null
23+
default = ""
2424
}
2525

2626
variable DRIVERS_VERSION {
@@ -116,6 +116,7 @@ variable BASE_BUILD_MATRIX {
116116
builds = [
117117
{os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
118118
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
119+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
119120
]
120121
}
121122
}
@@ -127,15 +128,15 @@ variable PRO_BUILD_MATRIX {
127128
variable PACKAGE_MANAGER_BUILD_MATRIX {
128129
default = {
129130
builds = [
130-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
131+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
131132
]
132133
}
133134
}
134135

135136
variable CONNECT_BUILD_MATRIX {
136137
default = {
137138
builds = [
138-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = DEFAULT_QUARTO_VERSION},
139+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14", quarto = DEFAULT_QUARTO_VERSION},
139140
]
140141
}
141142
}
@@ -151,15 +152,15 @@ variable CONNECT_CONTENT_INIT_BUILD_MATRIX {
151152
variable R_SESSION_COMPLETE_BUILD_MATRIX {
152153
default = {
153154
builds = [
154-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
155+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
155156
]
156157
}
157158
}
158159

159160
variable WORKBENCH_BUILD_MATRIX {
160161
default = {
161162
builds = [
162-
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
163+
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
163164
]
164165
}
165166
}

product/base/Dockerfile.centos7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM centos:7 as build
22

33
### ARG declarations ###
4-
ARG R_VERSION=4.2.0
5-
ARG R_VERSION_ALT=3.6.2
4+
ARG R_VERSION=4.4.0
5+
ARG R_VERSION_ALT=4.3.3
66
ARG PYTHON_VERSION=3.9.14
77
ARG PYTHON_VERSION_ALT=3.8.15
88
ARG TINI_VERSION=0.19.0

product/base/Dockerfile.ubuntu2204

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM ubuntu:22.04 as build
22

33
### ARG declarations ###
44
ARG DEBIAN_FRONTEND=noninteractive
5-
ARG R_VERSION=4.2.3
6-
ARG R_VERSION_ALT=4.1.3
5+
ARG R_VERSION=4.4.0
6+
ARG R_VERSION_ALT=4.3.3
77
ARG PYTHON_VERSION=3.9.17
88
ARG PYTHON_VERSION_ALT=3.8.17
99
ARG TINI_VERSION=0.19.0

product/base/deps/ubuntu2204_packages.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ gpg-agent
1818
gsfonts
1919
imagemagick
2020
libarchive-dev
21+
libblas3
22+
libbz2-dev
2123
libcairo2-dev
24+
libcurl4
2225
libcurl4-openssl-dev
2326
libev-dev
2427
libfontconfig1-dev
@@ -27,26 +30,37 @@ libfribidi-dev
2730
libgdal-dev
2831
libgeos-dev
2932
libgl1-mesa-dev
33+
libglib2.0-0
3034
libglpk-dev
3135
libglu1-mesa-dev
3236
libgmp3-dev
3337
libharfbuzz-dev
3438
libicu-dev
3539
libjpeg-dev
40+
liblapack-dev
41+
liblzma-dev
3642
libmagick++-dev
3743
libmysqlclient-dev
44+
libncurses5-dev
3845
libopenblas-dev
46+
libpango-1.0-0
47+
libpangocairo-1.0-0
3948
libpaper-utils
4049
libpcre2-dev
4150
libpng-dev
4251
libproj-dev
52+
libreadline-dev
4353
libsodium-dev
4454
libssh2-1-dev
4555
libssl-dev
56+
libtcl8.6
4657
libtiff-dev
58+
libtirpc3
4759
libudunits2-dev
4860
libv8-dev
4961
libxml2-dev
62+
libx11-6
63+
libxt6
5064
locales
5165
lsb-release
5266
make

product/base/scripts/ubuntu/apt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ usage() {
2121
}
2222

2323
# Set defaults
24-
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
24+
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends"
2525
CLEAN=0
2626
UPDATE=0
2727

product/base/scripts/ubuntu/install_python.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ usage() {
2929

3030

3131
# Set defaults
32-
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
3332
PREFIX="/opt/python"
3433

3534
OPTIONS=$(getopt -o hdr: --long help,debug,prefix:,requirement: -- "$@")
@@ -73,7 +72,7 @@ fi
7372
PYTHON_BIN="${PREFIX}/${PYTHON_VERSION}/bin/python"
7473

7574
# Set apt options
76-
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
75+
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends"
7776

7877
# Set ubuntu version
7978
UBUNTU_VERSION=$(lsb_release -rs)

product/base/scripts/ubuntu/install_r.sh

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ usage() {
3131

3232

3333
# Set defaults
34-
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
3534
PREFIX="/opt/R"
3635
R_EXISTS=0
3736
WITH_SOURCE=0
@@ -85,7 +84,7 @@ fi
8584
R_BIN="${PREFIX}/${R_VERSION}/bin/R"
8685

8786
# Set apt options
88-
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
87+
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends"
8988
APT_KEY="0x51716619e084dab9"
9089
APT_KEY_FILE="/usr/share/keyrings/cran-rstudio-keyring.gpg"
9190
APT_FILE="/etc/apt/sources.list.d/cran-rstudio.list"
@@ -130,29 +129,6 @@ install_r() {
130129
rm "/tmp/r-${R_VERSION}.deb"
131130
}
132131

133-
install_r_dependencies() {
134-
# There are many dependencies that R users may rely on that we want to
135-
# include in the images. These include things like a functional X server,
136-
# fonts, and other libraries that are commonly used by R packages.
137-
local r_deps="r-base-core r-base-dev"
138-
139-
# Check whether dependencies are already installed
140-
# shellcheck disable=2086
141-
if dpkg -s $r_deps >/dev/null 2>&1 ; then
142-
echo "$d R dependencies already installed $d"
143-
return
144-
fi
145-
146-
echo "$d$d Installng R depencencies $d$d"
147-
# Ensure we have apt-transport-https installed
148-
# shellcheck disable=SC2086
149-
apt-get install $APT_ARGS apt-transport-https
150-
151-
# Install R dependencies
152-
# shellcheck disable=2086
153-
apt-get install $APT_ARGS $r_deps
154-
}
155-
156132
install_r_packages() {
157133
if [ ! -f "$R_PKG_FILE" ]; then
158134
echo "$d R package file $R_PKG_FILE does not exist $d"
@@ -180,10 +156,9 @@ get_r_source() {
180156
}
181157

182158

183-
# Only add the CRAN apt source & dependencies if we don't expect R to exist
159+
# Only add the CRAN apt source if we don't expect R to exist
184160
if [ "$R_EXISTS" -eq 0 ]; then
185161
add_cran_apt_source
186-
install_r_dependencies
187162
fi
188163

189164
# Check if R is already installed

product/base/test/goss.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ package:
66
installed: true
77
cracklib-runtime:
88
installed: true
9+
r-recommended:
10+
installed: false
911
{{end}}
1012
{{if .Env.OS | regexMatch "centos.*"}}
1113
epel-release:
@@ -45,6 +47,8 @@ file:
4547
exists: true
4648
/opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python3:
4749
exists: true
50+
/usr/lib/R/bin/R:
51+
exists: false
4852
/tini:
4953
exists: true
5054
{{if .Env.OS | regexMatch "ubuntu.*"}}

r-session-complete/Dockerfile.ubuntu2204

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM product-base-pro as build
22

33
ARG DEBIAN_FRONTEND=noninteractive
4-
ARG R_VERSION=4.2.3
5-
ARG R_VERSION_ALT=4.1.3
4+
ARG R_VERSION=4.4.0
5+
ARG R_VERSION_ALT=4.3.3
66
ARG PYTHON_VERSION=3.9.17
77
ARG PYTHON_VERSION_ALT=3.8.17
88
ARG JUPYTERLAB_VERSION=3.6.5

0 commit comments

Comments
 (0)