Skip to content

Commit

Permalink
Merge branch 'dev' into fix-python-verison-jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpittwood authored Aug 9, 2023
2 parents ae2a31f + e33a771 commit bcf4f84
Show file tree
Hide file tree
Showing 21 changed files with 90 additions and 311 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
if: steps.build1.outcome == 'failure'
uses: ./.github/actions/build-test-scan-push
with:
context: .${{ matrix.config.product }}
context: ./${{ matrix.config.product }}
os: ${{ matrix.config.os }}
product: product-base
image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
config:
- {os: 'centos7', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {os: 'ubuntu1804', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {os: 'ubuntu1804', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
Expand Down Expand Up @@ -119,8 +117,6 @@ jobs:
config:
- {os: 'centos7', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {os: 'ubuntu1804', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {os: 'ubuntu1804', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ jobs:
fail-fast: false
matrix:
config:
- {product: 'product/base', os: 'ubuntu1804'}
- {product: 'product/base', os: 'ubuntu2204'}
- {product: 'product/base', os: 'centos7'}
- {product: 'product/pro', os: 'ubuntu1804'}
- {product: 'product/pro', os: 'ubuntu2204'}
- {product: 'product/pro', os: 'centos7'}
- {product: 'workbench', os: 'ubuntu2204'}
Expand Down
6 changes: 3 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ _get-clean-version $VERSION:
#!/usr/bin/env bash
echo -n "$VERSION" | sed 's/[+|-].*//g'
# just _parse-os bionic
# just _parse-os jammy
_parse-os OS:
#!/usr/bin/env bash
if [[ "{{OS}}" == "bionic" ]]; then
Expand All @@ -44,7 +44,7 @@ _parse-os OS:
echo "{{OS}}"
fi
# just _rev-parse-os ubuntu1804
# just _rev-parse-os ubuntu2204
_rev-parse-os OS:
#!/usr/bin/env bash
if [[ "{{OS}}" == "ubuntu1804" ]]; then
Expand Down Expand Up @@ -299,7 +299,7 @@ test-image $PRODUCT $VERSION +IMAGES:
PYTHON_VERSION_ALT={{PYTHON_VERSION_ALT}} \
$PRODUCT/test "${IMAGE_ARRAY[0]}" "$VERSION"
# just lint workbench ubuntu1804
# just lint workbench ubuntu2204
lint $PRODUCT $OS:
#!/usr/bin/env bash
docker run --rm -i -v $PWD/hadolint.yaml:/.config/hadolint.yaml ghcr.io/hadolint/hadolint < $PRODUCT/Dockerfile.$(just _parse-os {{OS}})
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ changed in each image.

This file only captures pervasive, repository-wide changes.

# 2023-08-07

- Removed base image Ubuntu 18.04 builds.

# 2023-08-01
- Overhauled the workflows for this repository to use official Github Actions over `just` targets for building, testing,
scanning, and pushing images.
Expand Down
4 changes: 2 additions & 2 deletions content/base/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BUILDX_PATH := ""

IMAGE_PREFIX := "rstudio/"
PRODUCT := "content-base"
IMAGE_OS := "ubuntu1804"
IMAGE_OS := "ubuntu2204"

R_VERSION := "3.6.3"

Expand All @@ -14,7 +14,7 @@ QUARTO_VERSION := "1.3.340"

DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS

# Build content base image - just build ubuntu1804 3.6.3 3.9.5 rstudio/content-base:r3.6.3-py3.9.5-bionic
# Build content base image - just build ubuntu2204 3.6.3 3.9.5 rstudio/content-base:r3.6.3-py3.9.5-bionic
build OS=IMAGE_OS _R_VERSION=R_VERSION _PYTHON_VERSION=PYTHON_VERSION +TAGS="":
#!/usr/bin/env bash
set -euxo pipefail
Expand Down
4 changes: 2 additions & 2 deletions content/pro/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BUILDX_PATH := ""

IMAGE_PREFIX := "rstudio/"
PRODUCT := "content-pro"
IMAGE_OS := "ubuntu1804"
IMAGE_OS := "ubuntu2204"

R_VERSION := "3.6.3"

Expand All @@ -15,7 +15,7 @@ DRIVERS_VERSION_RHEL := DRIVERS_VERSION + "-1"

DEFAULT_TAG := IMAGE_PREFIX + PRODUCT + ":r" + R_VERSION + "-py" + PYTHON_VERSION + "-" + IMAGE_OS

# Build content pro image - just build ubuntu1804 3.6.3 3.9.5 rstudio/content-pro:r3.6.3-py3.9.5-bionic
# Build content pro image - just build ubuntu2204 3.6.3 3.9.5 rstudio/content-pro:r3.6.3-py3.9.5-bionic
build OS=IMAGE_OS _R_VERSION=R_VERSION _PYTHON_VERSION=PYTHON_VERSION +TAGS=DEFAULT_TAG:
#!/usr/bin/env bash
set -euxo pipefail
Expand Down
39 changes: 31 additions & 8 deletions package-manager/Dockerfile.ubuntu1804
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,34 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ARG DEBIAN_FRONTEND=noninteractive
ARG TINI_VERSION=0.19.0

ENV PATH /opt/rstudio-pm/bin:$PATH

# Upgrade/install packages ----------------------------------------------------#
RUN apt-get update --fix-missing \
&& apt-get upgrade -yq \
&& apt-get install -yq --no-install-recommends \
ca-certificates \
curl \
dirmngr \
gpg \
gpg-agent \
&& rm -rf /var/lib/apt/lists/*

# Runtime settings ------------------------------------------------------------#
ARG TINI_VERSION=0.18.0
RUN curl -L -o /usr/local/bin/tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini && \
chmod +x /usr/local/bin/tini
ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini
ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc
# Keys must be pulled using curl, gpg calls intermittently fail on 18.04 with "gpg: keyserver receive failed: Cannot assign requested address"
RUN gpg --update-trustdb \
&& curl -sL -o /tmp/tini-key.asc "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6380dc428747f6c393feaca59a84159d7001a4e5" \
&& gpg --import /tmp/tini-key.asc \
&& rm /tmp/tini-key.asc \
&& gpg --batch --verify /tini.asc /tini \
&& chmod +x /tini \
&& ln -s /tini /usr/local/bin/tini

# Add another R version -------------------------------------------------------#

ARG R_VERSION_ALT=3.6.2
RUN apt-get update -qq && \
curl -O https://cdn.rstudio.com/r/ubuntu-1804/pkgs/r-${R_VERSION_ALT}_1_amd64.deb && \
Expand All @@ -31,17 +49,22 @@ RUN apt-get update -qq && \
# Download RStudio Package Manager ---------------------------------------------#
ARG RSPM_VERSION=2023.04.0-6
ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu/amd64
# Keys must be pulled using curl, gpg calls intermittently fail on 18.04 with "gpg: keyserver receive failed: Cannot assign requested address"
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends gdebi-core dpkg-sig \
&& apt-get install -y --no-install-recommends gdebi-core gpg dpkg-sig \
&& curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \
# Pre 7/25/23 packages
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \
&& curl -sL -o /tmp/rstudio-key.asc "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xfe8564cff1ab93f1728645193f32ee77e331692f" \
&& gpg --import /tmp/rstudio-key.asc \
&& rm /tmp/rstudio-key.asc \
# Post 7/25 packages
&& gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \
&& curl -sL -o /tmp/posit-key.asc "https://keys.openpgp.org/vks/v1/by-fingerprint/8B65E5A107BBEFE3BA99C59751C0B5BB19F92D60" \
&& gpg --import /tmp/posit-key.asc \
&& rm /tmp/posit-key.asc \
&& dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \
&& RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \
&& rm rstudio-pm_${RSPM_VERSION}_amd64.deb \
&& apt-get purge -y gdebi-core dpkg-sig \
&& apt-get purge -y gdebi-core dpkg-sig gpg gpg-agent \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
41 changes: 0 additions & 41 deletions package-manager/Dockerfile.ubuntu1804.draft

This file was deleted.

26 changes: 20 additions & 6 deletions package-manager/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,30 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ARG DEBIAN_FRONTEND=noninteractive
ARG TINI_VERSION=0.19.0

ENV PATH /opt/rstudio-pm/bin:$PATH

# Upgrade/install packages ----------------------------------------------------#
RUN apt-get update --fix-missing \
&& apt-get upgrade -yq \
&& apt-get install -yq --no-install-recommends \
ca-certificates \
dirmngr \
gpg \
gpg-agent \
&& rm -rf /var/lib/apt/lists/*

# Runtime settings ------------------------------------------------------------#
ARG TINI_VERSION=0.18.0
RUN curl -L -o /usr/local/bin/tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini && \
chmod +x /usr/local/bin/tini
ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini
ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc
RUN gpg --update-trustdb \
&& gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \
&& gpg --batch --verify /tini.asc /tini \
&& chmod +x /tini \
&& ln -s /tini /usr/local/bin/tini

# Add another R version -------------------------------------------------------#

ARG R_VERSION_ALT=3.6.2
RUN apt-get update -qq && \
curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION_ALT}_1_amd64.deb && \
Expand All @@ -32,7 +46,7 @@ RUN apt-get update -qq && \
ARG RSPM_VERSION=2023.04.0-6
ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu22/amd64
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends gdebi-core dpkg-sig \
&& apt-get install -y --no-install-recommends ca-certificates gdebi-core gpg dpkg-sig \
&& curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \
# Pre 7/25/23 packages
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \
Expand All @@ -41,7 +55,7 @@ RUN apt-get update --fix-missing \
&& dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \
&& RSTUDIO_INSTALL_NO_LICENSE_INITIALIZATION=1 gdebi -n rstudio-pm_${RSPM_VERSION}_amd64.deb \
&& rm rstudio-pm_${RSPM_VERSION}_amd64.deb \
&& apt-get purge -y gdebi-core dpkg-sig \
&& apt-get purge -y gdebi-core dpkg-sig gpg gpg-agent \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
41 changes: 0 additions & 41 deletions package-manager/Dockerfile.ubuntu2204.draft

This file was deleted.

10 changes: 5 additions & 5 deletions package-manager/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BUILDX_PATH := ""

IMAGE_PREFIX := "rstudio-"
PRODUCT := "package-manager"
IMAGE_OS := "ubuntu1804"
IMAGE_OS := "ubuntu2204"

RSPM_VERSION := "2023.04.0-6"
RSPM_LICENSE := ""
Expand All @@ -22,7 +22,7 @@ PERSIST_LICENSE_DIR := join(justfile_directory(), "tmp-lic")
_make-default-tag OS=IMAGE_OS:
echo "{{IMAGE_PREFIX}}{{PRODUCT}}:{{OS}}-$(just -f ../Justfile _get-tag-safe-version {{RSPM_VERSION}})"

# Build Package Manager image - just build ubuntu1804 2022.07.2-11 rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11
# Build Package Manager image - just build ubuntu2204 2022.07.2-11 rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11
build OS=IMAGE_OS VERSION=RSPM_VERSION *TAGS="":
#!/usr/bin/env bash
set -euxo pipefail
Expand Down Expand Up @@ -50,7 +50,7 @@ build OS=IMAGE_OS VERSION=RSPM_VERSION *TAGS="":
--build-arg R_VERSION_ALT="{{ R_VERSION_ALT }}" \
--file=./Dockerfile.$(just -f ../Justfile _parse-os {{OS}}) .

# Test Package Manager image - just test rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11 2022.07.2-11
# Test Package Manager image - just test rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11
test TAG=`just _make-default-tag` VERSION=RSPM_VERSION CMD="":
#!/usr/bin/env bash
set -euxo pipefail
Expand All @@ -62,11 +62,11 @@ test TAG=`just _make-default-tag` VERSION=RSPM_VERSION CMD="":
R_VERSION_ALT="{{ R_VERSION_ALT }}" \
docker-compose -f ./docker-compose.test.yml run sut {{ CMD }}
# Test Package Manager image interactively - just test-i rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11 2022.07.2-11
# Test Package Manager image interactively - just test-i rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11 2022.07.2-11
test-i TAG=`just _make-default-tag` VERSION=RSPM_VERSION:
just test {{ TAG }} {{ VERSION }} bash

# Run Package Manager - just RSPM_LICENSE="<RSPM license>" run rstudio/rstudio-package-manager:ubuntu1804-2022.07.2-11
# Run Package Manager - just RSPM_LICENSE="<RSPM license>" run rstudio/rstudio-package-manager:ubuntu2204-2022.07.2-11
run TAG=`just _make-default-tag` CMD="":
#!/usr/bin/env bash
set -euxo pipefail
Expand Down
1 change: 1 addition & 0 deletions product/base/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN yum upgrade -y -q \
libuser-devel \
libxml2-devel \
openssl-devel \
openssh-clients \
pandoc \
perl-Digest-MD5 \
postgresql-libs \
Expand Down
Loading

0 comments on commit bcf4f84

Please sign in to comment.