Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev to main #770

Merged
merged 7 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 51 additions & 9 deletions .github/workflows/build-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
options:
- connect
- connect-content-init
- content-images
- package-manager
- r-session-complete
- workbench
Expand Down Expand Up @@ -48,12 +47,9 @@ jobs:
name: Setup
runs-on: ubuntu-latest

concurrency:
group: bake-setup-${{ github.ref }}
cancel-in-progress: true

outputs:
GIT_SHA: ${{ steps.checkout.outputs.sha }}
GIT_SHA: ${{ steps.get-git-sha.outputs.GIT_SHA }}
BAKE_FILE: ${{ steps.bake-file.outputs.BAKE_FILE }}

steps:
- name: Checkout
Expand All @@ -63,9 +59,22 @@ jobs:
id: get-git-sha
run: |
GIT_SHA=$(git rev-parse --short HEAD)
echo "Setting GIT_SHA=$GIT_SHA"
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT

- name: Set BAKE_FILE
id: bake-file
run: |
if [[ "${{ inputs.type }}" == "release" ]]; then
BAKE_FILE="docker-bake.hcl"
else
BAKE_FILE="docker-bake.preview.hcl"
fi
echo "Using $BAKE_FILE"
echo "BAKE_FILE=$BAKE_FILE" >> $GITHUB_OUTPUT

build:
needs: [setup]
runs-on: ubuntu-latest-4x
name: manual-build

Expand Down Expand Up @@ -95,15 +104,48 @@ jobs:
run: |
pip install requests

- name: Get Target
id: get-target
shell: bash
run: |
# Append suffix if necessary
target="${{ inputs.product }}"
if [[ "${{ inputs.type }}" != "release" ]]; then
target="${{ inputs.product }}-${{ inputs.type }}"
fi
echo "Setting TARGET=$target"
echo "TARGET=$target" >> $GITHUB_OUTPUT

- name: Get Version
id: get-version
shell: bash
run: |
# Determine how to set the version
if [[ "${{ inputs.version }}" == "auto" ]]; then
VERSION=`just -f ci.Justfile get-version ${{ inputs.product }} --type=${{ inputs.type }} --local`
else
VERSION="${{ inputs.version }}"
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

# Set the appropriate env var
suffix="_VERSION"
if [[ "${{ inputs.type }}" == "preview" ]]; then
suffix="_PREVIEW_VERSION"
elif [[ "${{ inputs.type }}" == "daily" ]]; then
suffix="_DAILY_VERSION"
fi

product="${{ inputs.product }}"
if [[ "$product" == "connect" ]] || [[ "$product" == "connect-content-init" ]] || [[ "$product" == "content-images" ]]; then
product="CONNECT"
elif [[ "$product" == "package-manager" ]]; then
product="PACKAGE_MANAGER"
else
product="WORKBENCH"
fi

echo "Setting $product$suffix=$VERSION"
echo "$product$suffix=$VERSION" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -114,10 +156,10 @@ jobs:
- name: Build/Test/Push manual build image
uses: ./.github/actions/bake-test-push
with:
target: ${{ inputs.product }}
target: ${{ steps.get-target.outputs.TARGET }}
bakefile: ${{ needs.setup.outputs.BAKE_FILE }}
push-image: ${{ inputs.push }}
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

5 changes: 3 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ variable BASE_BUILD_MATRIX {
{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"},
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
]
}
}
Expand Down Expand Up @@ -166,15 +167,15 @@ variable CONTENT_BUILD_MATRIX {
variable R_SESSION_COMPLETE_BUILD_MATRIX {
default = {
builds = [
{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.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
]
}
}

variable WORKBENCH_BUILD_MATRIX {
default = {
builds = [
{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.4.0", r_alternate = "4.3.3", py_primary = "3.12.1", py_alternate = "3.11.7"},
]
}
}
Expand Down
19 changes: 10 additions & 9 deletions docker-bake.preview.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ variable BRANCH {
}

variable CONNECT_DAILY_VERSION {
default = null
default = ""
}

variable PACKAGE_MANAGER_PREVIEW_VERSION {
default = null
default = ""
}

variable PACKAGE_MANAGER_DAILY_VERSION {
default = null
default = ""
}

variable WORKBENCH_DAILY_VERSION {
default = null
default = ""
}

variable WORKBENCH_PREVIEW_VERSION {
default = null
default = ""
}

variable DRIVERS_VERSION {
Expand Down Expand Up @@ -116,6 +116,7 @@ variable BASE_BUILD_MATRIX {
builds = [
{os = "centos7", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
]
}
}
Expand All @@ -127,15 +128,15 @@ variable PRO_BUILD_MATRIX {
variable PACKAGE_MANAGER_BUILD_MATRIX {
default = {
builds = [
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
]
}
}

variable CONNECT_BUILD_MATRIX {
default = {
builds = [
{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},
{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},
]
}
}
Expand All @@ -151,15 +152,15 @@ variable CONNECT_CONTENT_INIT_BUILD_MATRIX {
variable R_SESSION_COMPLETE_BUILD_MATRIX {
default = {
builds = [
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
]
}
}

variable WORKBENCH_BUILD_MATRIX {
default = {
builds = [
{os = "ubuntu2204", r_primary = "4.2.3", r_alternate = "4.1.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
{os = "ubuntu2204", r_primary = "4.4.0", r_alternate = "4.3.3", py_primary = "3.11.9", py_alternate = "3.10.14"},
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions product/base/Dockerfile.centos7
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM centos:7 as build

### ARG declarations ###
ARG R_VERSION=4.2.0
ARG R_VERSION_ALT=3.6.2
ARG R_VERSION=4.4.0
ARG R_VERSION_ALT=4.3.3
ARG PYTHON_VERSION=3.9.14
ARG PYTHON_VERSION_ALT=3.8.15
ARG TINI_VERSION=0.19.0
Expand Down
4 changes: 2 additions & 2 deletions product/base/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM ubuntu:22.04 as build

### ARG declarations ###
ARG DEBIAN_FRONTEND=noninteractive
ARG R_VERSION=4.2.3
ARG R_VERSION_ALT=4.1.3
ARG R_VERSION=4.4.0
ARG R_VERSION_ALT=4.3.3
ARG PYTHON_VERSION=3.9.17
ARG PYTHON_VERSION_ALT=3.8.17
ARG TINI_VERSION=0.19.0
Expand Down
14 changes: 14 additions & 0 deletions product/base/deps/ubuntu2204_packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ gpg-agent
gsfonts
imagemagick
libarchive-dev
libblas3
libbz2-dev
libcairo2-dev
libcurl4
libcurl4-openssl-dev
libev-dev
libfontconfig1-dev
Expand All @@ -27,26 +30,37 @@ libfribidi-dev
libgdal-dev
libgeos-dev
libgl1-mesa-dev
libglib2.0-0
libglpk-dev
libglu1-mesa-dev
libgmp3-dev
libharfbuzz-dev
libicu-dev
libjpeg-dev
liblapack-dev
liblzma-dev
libmagick++-dev
libmysqlclient-dev
libncurses5-dev
libopenblas-dev
libpango-1.0-0
libpangocairo-1.0-0
libpaper-utils
libpcre2-dev
libpng-dev
libproj-dev
libreadline-dev
libsodium-dev
libssh2-1-dev
libssl-dev
libtcl8.6
libtiff-dev
libtirpc3
libudunits2-dev
libv8-dev
libxml2-dev
libx11-6
libxt6
locales
lsb-release
make
Expand Down
2 changes: 1 addition & 1 deletion product/base/scripts/ubuntu/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ usage() {
}

# Set defaults
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends"
CLEAN=0
UPDATE=0

Expand Down
3 changes: 1 addition & 2 deletions product/base/scripts/ubuntu/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ usage() {


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

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

# Set apt options
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq --no-install-recommends"

# Set ubuntu version
UBUNTU_VERSION=$(lsb_release -rs)
Expand Down
29 changes: 2 additions & 27 deletions product/base/scripts/ubuntu/install_r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ usage() {


# Set defaults
APT_ARGS="-o DPkg::Lock::Timeout=60 -y -qq"
PREFIX="/opt/R"
R_EXISTS=0
WITH_SOURCE=0
Expand Down Expand Up @@ -85,7 +84,7 @@ fi
R_BIN="${PREFIX}/${R_VERSION}/bin/R"

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

install_r_dependencies() {
# There are many dependencies that R users may rely on that we want to
# include in the images. These include things like a functional X server,
# fonts, and other libraries that are commonly used by R packages.
local r_deps="r-base-core r-base-dev"

# Check whether dependencies are already installed
# shellcheck disable=2086
if dpkg -s $r_deps >/dev/null 2>&1 ; then
echo "$d R dependencies already installed $d"
return
fi

echo "$d$d Installng R depencencies $d$d"
# Ensure we have apt-transport-https installed
# shellcheck disable=SC2086
apt-get install $APT_ARGS apt-transport-https

# Install R dependencies
# shellcheck disable=2086
apt-get install $APT_ARGS $r_deps
}

install_r_packages() {
if [ ! -f "$R_PKG_FILE" ]; then
echo "$d R package file $R_PKG_FILE does not exist $d"
Expand Down Expand Up @@ -180,10 +156,9 @@ get_r_source() {
}


# Only add the CRAN apt source & dependencies if we don't expect R to exist
# Only add the CRAN apt source if we don't expect R to exist
if [ "$R_EXISTS" -eq 0 ]; then
add_cran_apt_source
install_r_dependencies
fi

# Check if R is already installed
Expand Down
4 changes: 4 additions & 0 deletions product/base/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package:
installed: true
cracklib-runtime:
installed: true
r-recommended:
installed: false
{{end}}
{{if .Env.OS | regexMatch "centos.*"}}
epel-release:
Expand Down Expand Up @@ -45,6 +47,8 @@ file:
exists: true
/opt/python/{{.Env.PYTHON_VERSION_ALT}}/bin/python3:
exists: true
/usr/lib/R/bin/R:
exists: false
/tini:
exists: true
{{if .Env.OS | regexMatch "ubuntu.*"}}
Expand Down
4 changes: 2 additions & 2 deletions r-session-complete/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM product-base-pro as build

ARG DEBIAN_FRONTEND=noninteractive
ARG R_VERSION=4.2.3
ARG R_VERSION_ALT=4.1.3
ARG R_VERSION=4.4.0
ARG R_VERSION_ALT=4.3.3
ARG PYTHON_VERSION=3.9.17
ARG PYTHON_VERSION_ALT=3.8.17
ARG JUPYTERLAB_VERSION=3.6.5
Expand Down
Loading
Loading