Skip to content

Commit

Permalink
Merge pull request #683 from rstudio/dev
Browse files Browse the repository at this point in the history
Release PPM 2023.12.0
  • Loading branch information
ianpittwood authored Jan 9, 2024
2 parents 0c53e6a + eb30c55 commit 5c3587f
Show file tree
Hide file tree
Showing 19 changed files with 186 additions and 264 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- {product: "workbench", type: "preview", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: "connect", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: "connect-content-init", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: "package-manager", type: "daily", os: "ubuntu1804", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: "package-manager", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: "r-session-complete", type: "daily", os: "ubuntu2204", r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: "r-session-complete", type: "daily", os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
Expand Down
97 changes: 1 addition & 96 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ jobs:
- {product: 'workbench', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {product: 'connect', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: 'connect-content-init', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: 'package-manager', os: 'ubuntu1804', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {product: 'package-manager', os: 'ubuntu2204', r-primary: "4.2.0", r-alternate: "3.6.2", py-primary: "3.9.5", py-alternate: "3.8.10"}
- {product: 'package-manager', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.17", py-alternate: "3.8.17"}
- {product: 'r-session-complete', os: 'centos7', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {product: 'r-session-complete', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
- {product: 'workbench-for-microsoft-azure-ml', os: 'ubuntu2204', r-primary: "4.2.3", r-alternate: "4.1.3", py-primary: "3.9.14", py-alternate: "3.8.15"}
Expand Down Expand Up @@ -358,97 +357,3 @@ jobs:
gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

# End retry logic

build-workbench-for-google-cloud-workstations:
needs: [ build-base, build-base-pro ]
runs-on: ubuntu-latest
name: build-workbench-for-google-cloud-workstations

permissions:
contents: read
packages: write

concurrency:
group: build-products-${{ matrix.config.product }}-${{ matrix.config.os }}-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Check Out Repo - cron main
if: github.event.schedule == '0 12 * * 1'
uses: actions/checkout@v3
with:
ref: main

- name: Check Out Repo
if: github.event.schedule != '0 12 * * 1'
uses: actions/checkout@v3

- name: Set up Just
uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Version
id: get-version
run: |
VERSION=$(just workbench-for-google-cloud-workstations/get-version)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Get build args
id: get-build-args
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
BUILD_ARGS=$(just workbench-for-google-cloud-workstations/get-build-args)
echo "BUILD_ARGS<<$EOF" >> $GITHUB_OUTPUT
echo "$BUILD_ARGS" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Get tags
id: get-tags
run: |
IMAGE_TAGS=$(just workbench-for-google-cloud-workstations/get-build-tags)
echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT
- name: Build/Test/Scan/Push base pro image
id: build1
uses: ./.github/actions/build-test-scan-push
continue-on-error: true
with:
context: ./workbench-for-google-cloud-workstations
os: ubuntu2004
product: workbench-for-google-cloud-workstations
image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }}
build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }}
push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 12 * * 1' }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
snyk-org-id: ${{ secrets.SNYK_ORG_ID }}
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 }}'

# Begin retry logic

- name: Wait 60s on failure before retrying
if: steps.build1.outcome == 'failure'
run: sleep 60

- name: Retry - Build/Test/Scan/Push base pro image
id: build2
if: steps.build1.outcome == 'failure'
uses: ./.github/actions/build-test-scan-push
with:
context: ./workbench-for-google-cloud-workstations
os: ubuntu2004
product: workbench-for-google-cloud-workstations
image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }}
build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }}
push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 12 * * 1' }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
snyk-org-id: ${{ secrets.SNYK_ORG_ID }}
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 }}'

# End retry logic
103 changes: 103 additions & 0 deletions .github/workflows/build-workbench-gcw.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
on:
schedule:
- cron: '0 14 * * 1' # If updating this value, be sure to update logic for all `push-image` arguments!
push:
branches:
- main
- dev
pull_request:

name: Workbench for GCW - Build, Test, Scan, and Push
jobs:
build-workbench-for-google-cloud-workstations:
runs-on: ubuntu-latest
name: build-workbench-for-google-cloud-workstations

permissions:
contents: read
packages: write

concurrency:
group: build-products-${{ matrix.config.product }}-${{ matrix.config.os }}-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Check Out Repo - cron main
if: github.event.schedule == '0 14 * * 1'
uses: actions/checkout@v3
with:
ref: main

- name: Check Out Repo
if: github.event.schedule != '0 14 * * 1'
uses: actions/checkout@v3

- name: Set up Just
uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Version
id: get-version
run: |
VERSION=$(just workbench-for-google-cloud-workstations/get-version)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Get build args
id: get-build-args
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
BUILD_ARGS=$(just workbench-for-google-cloud-workstations/get-build-args)
echo "BUILD_ARGS<<$EOF" >> $GITHUB_OUTPUT
echo "$BUILD_ARGS" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Get tags
id: get-tags
run: |
IMAGE_TAGS=$(just workbench-for-google-cloud-workstations/get-build-tags)
echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT
- name: Build/Test/Scan/Push base pro image
id: build1
uses: ./.github/actions/build-test-scan-push
continue-on-error: true
with:
context: ./workbench-for-google-cloud-workstations
os: ubuntu2004
product: workbench-for-google-cloud-workstations
image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }}
build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }}
push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 14 * * 1' }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
snyk-org-id: ${{ secrets.SNYK_ORG_ID }}
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 }}'

# Begin retry logic

- name: Wait 60s on failure before retrying
if: steps.build1.outcome == 'failure'
run: sleep 60

- name: Retry - Build/Test/Scan/Push base pro image
id: build2
if: steps.build1.outcome == 'failure'
uses: ./.github/actions/build-test-scan-push
with:
context: ./workbench-for-google-cloud-workstations
os: ubuntu2004
product: workbench-for-google-cloud-workstations
image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }}
build-args: ${{ steps.get-build-args.outputs.BUILD_ARGS }}
push-image: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 14 * * 1' }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
snyk-org-id: ${{ secrets.SNYK_ORG_ID }}
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 }}'

# End retry logic
1 change: 0 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- {product: 'workbench', os: 'ubuntu2204'}
- {product: 'connect', os: 'ubuntu2204'}
- {product: 'connect-content-init', os: 'ubuntu2204'}
- {product: 'package-manager', os: 'ubuntu1804'}
- {product: 'package-manager', os: 'ubuntu2204'}
- {product: 'r-session-complete', os: 'centos7'}
- {product: 'r-session-complete', os: 'ubuntu2204'}
Expand Down
12 changes: 12 additions & 0 deletions ci.Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ get-product-args $PRODUCT $OS $VERSION $USE_S3="false" $BRANCH=`git branch --sho
else
SRC_IMAGE_NAME="product-base-pro-dev"
fi
elif [[ $PRODUCT == "package-manager" ]]; then
if [[ $BRANCH == "main" ]]; then
SRC_IMAGE_NAME="product-base"
else
SRC_IMAGE_NAME="product-base-dev"
fi
fi

if [[ "${OS}" == "centos7" ]]; then
Expand Down Expand Up @@ -217,6 +223,12 @@ get-prerelease-args $TYPE $PRODUCT $OS $VERSION $BRANCH=`git branch --show`:
else
SRC_IMAGE_NAME="product-base-pro-dev"
fi
elif [[ $PRODUCT == "package-manager" ]]; then
if [[ $BRANCH == "main" ]]; then
SRC_IMAGE_NAME="product-base"
else
SRC_IMAGE_NAME="product-base-dev"
fi
fi

if [[ "${OS}" == "centos7" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
container_name: rstudio-package-manager
build:
context: ./package-manager
dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu1804}"
dockerfile: "Dockerfile.${IMAGE_OS:-ubuntu2204}"
args:
RSPM_VERSION: 2023.12.0-13
image: rstudio/rstudio-package-manager:2023.12.0
Expand Down
2 changes: 2 additions & 0 deletions hadolint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ignored:
- DL3008
# Suppresses warning for version pinning on yum installs. We currently do not practice this approach.
- DL3033
# Suppresses warning for version pinning on pip installs. We currently do not practice this approach.
- DL3013
# Suppresses info for too many consecutive RUN statements. Multiple consecutive RUN statements are often a conscious
# design choice in our Dockerfiles, but we could consider condensing them in the future.
- DL3059
Expand Down
2 changes: 1 addition & 1 deletion matrix-preview.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{"product": "rstudio-workbench-preview", "dir": "workbench", "prefix": "RSW", "os": "bionic", "arch": "amd64", "version": "preview"},
{"product": "rstudio-connect-preview", "dir": "connect", "prefix": "RSC", "os": "bionic", "arch": "amd64", "version": "daily"},
{"product": "rstudio-connect-content-init-preview", "dir": "connect-content-init", "prefix": "RSC", "os": "bionic", "arch": "amd64", "version": "daily"},
{"product": "rstudio-package-manager-preview", "dir": "package-manager", "prefix": "RSPM", "os": "bionic", "arch": "amd64", "version": "daily"},
{"product": "rstudio-package-manager-preview", "dir": "package-manager", "prefix": "RSPM", "os": "jammy", "arch": "amd64", "version": "daily"},
{"product": "r-session-complete-preview", "tag_prefix": "bionic-", "dir": "r-session-complete", "os": "bionic", "arch": "amd64", "prefix": "RSW", "version": "daily"},
{"product": "r-session-complete-preview", "tag_prefix": "centos7-", "dir": "r-session-complete", "os": "centos7", "arch": "x86_64", "prefix": "RSW", "version": "daily"},
{"product": "r-session-complete-preview", "tag_prefix": "bionic-", "dir": "r-session-complete", "os": "bionic", "arch": "amd64", "prefix": "RSW", "version": "preview"},
Expand Down
2 changes: 2 additions & 0 deletions package-manager/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
RSPM_VERSION=2023.12.0-13
R_VERSION=4.2.3
R_VERSION_ALT=4.1.3
PYTHON_VERSION=3.9.17
PYTHON_VERSION_ALT=3.8.17
94 changes: 0 additions & 94 deletions package-manager/Dockerfile.ubuntu1804

This file was deleted.

Loading

0 comments on commit 5c3587f

Please sign in to comment.