From 83d9a2ca45913e3efcba6cd8bafd2094cf9df669 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Mon, 30 Jan 2023 20:54:56 +0000 Subject: [PATCH 01/17] Update buildkit and dazzle dependencies * `buildkit` 0.10.6 -> 0.11.2 * `dazzle` v0.1.13 -> v0.1.14 --- .github/workflows/pull-request.yml | 4 ++-- .github/workflows/push-main.yml | 4 ++-- .gitpod.Dockerfile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b23327472..c5edea8b9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -24,11 +24,11 @@ jobs: - name: 🔆 Install dazzle run: | - curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.13/dazzle_0.1.13_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin + curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.14/dazzle_0.1.14_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin - name: 🏗️ Setup buildkit run: | - curl -sSL https://github.com/moby/buildkit/releases/download/v0.10.6/buildkit-v0.10.6.linux-amd64.tar.gz | sudo tar xvz -C /usr + curl -sSL https://github.com/moby/buildkit/releases/download/v0.11.2/buildkit-v0.11.2.linux-amd64.tar.gz | sudo tar xvz -C /usr sudo buildkitd --oci-worker=true --oci-worker-net=host --debug --group docker & sudo su -c "while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done" sudo chmod +777 /run/buildkit/buildkitd.sock diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index a2b63103d..fec621124 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -43,7 +43,7 @@ jobs: - name: 🔆 Install dazzle run: | - curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.13/dazzle_0.1.13_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin + curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.14/dazzle_0.1.14_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin - name: 🔆 Install skopeo run: | @@ -56,7 +56,7 @@ jobs: - name: 🏗️ Setup buildkit run: | - curl -sSL https://github.com/moby/buildkit/releases/download/v0.10.6/buildkit-v0.10.6.linux-amd64.tar.gz | sudo tar xvz -C /usr + curl -sSL https://github.com/moby/buildkit/releases/download/v0.11.2/buildkit-v0.11.2.linux-amd64.tar.gz | sudo tar xvz -C /usr sudo buildkitd --oci-worker=true --oci-worker-net=host --debug --group docker & sudo su -c "while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done" sudo chmod +777 /run/buildkit/buildkitd.sock diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index b6623a496..e4475b1c4 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -2,14 +2,14 @@ FROM gitpod/workspace-full ENV RETRIGGER=3 -ENV BUILDKIT_VERSION=0.10.6 +ENV BUILDKIT_VERSION=0.11.2 ENV BUILDKIT_FILENAME=buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz USER root # Install dazzle, buildkit and pre-commit RUN curl -sSL https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/${BUILDKIT_FILENAME} | tar -xvz -C /usr -RUN curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.13/dazzle_0.1.13_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin +RUN curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.14/dazzle_0.1.14_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin RUN curl -sSL https://github.com/mvdan/sh/releases/download/v3.5.1/shfmt_v3.5.1_linux_amd64 -o /usr/bin/shfmt \ && chmod +x /usr/bin/shfmt RUN install-packages shellcheck \ From 23d24b22192340cbccb1e9e296e4de9799840f29 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 18:02:09 +0000 Subject: [PATCH 02/17] Update Dazzle and consolidate source of truths for dazzle and buildkit --- .github/workflows/pull-request.yml | 7 +++++-- .github/workflows/push-main.yml | 6 ++++-- .gitpod.Dockerfile | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c5edea8b9..84063d413 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -5,6 +5,9 @@ on: jobs: build: runs-on: ubuntu-latest + env: + DAZZLE_VERSION: 0.1.15 + BUILDKIT_VERSION: 0.11.2 steps: - name: 📥 Checkout workspace-images uses: actions/checkout@v3 @@ -24,11 +27,11 @@ jobs: - name: 🔆 Install dazzle run: | - curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.14/dazzle_0.1.14_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin + curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v${{env.DAZZLE_VERSION}}/dazzle_${{env.DAZZLE_VERSION}}_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin - name: 🏗️ Setup buildkit run: | - curl -sSL https://github.com/moby/buildkit/releases/download/v0.11.2/buildkit-v0.11.2.linux-amd64.tar.gz | sudo tar xvz -C /usr + curl -sSL https://github.com/moby/buildkit/releases/download/v${{env.BUILDKIT_VERSION}}/buildkit-v${{env.BUILDKIT_VERSION}}.linux-amd64.tar.gz | sudo tar xvz -C /usr sudo buildkitd --oci-worker=true --oci-worker-net=host --debug --group docker & sudo su -c "while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done" sudo chmod +777 /run/buildkit/buildkitd.sock diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index fec621124..27abe30d4 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -23,6 +23,8 @@ jobs: GAR_IMAGE_REGISTRY: europe-docker.pkg.dev DH_IMAGE_REGISTRY: registry.hub.docker.com IAM_SERVICE_ACCOUNT: workspace-images-gha-sa@gitpod-artifacts.iam.gserviceaccount.com + DAZZLE_VERSION: 0.1.15 + BUILDKIT_VERSION: 0.11.2 steps: - name: 📥 Checkout workspace-images @@ -43,7 +45,7 @@ jobs: - name: 🔆 Install dazzle run: | - curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.14/dazzle_0.1.14_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin + curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v${{env.DAZZLE_VERSION}}/dazzle_${{env.DAZZLE_VERSION}}_Linux_x86_64.tar.gz | sudo tar -xvz -C /usr/local/bin - name: 🔆 Install skopeo run: | @@ -56,7 +58,7 @@ jobs: - name: 🏗️ Setup buildkit run: | - curl -sSL https://github.com/moby/buildkit/releases/download/v0.11.2/buildkit-v0.11.2.linux-amd64.tar.gz | sudo tar xvz -C /usr + curl -sSL https://github.com/moby/buildkit/releases/download/v${{env.BUILDKIT_VERSION}}/buildkit-v${{env.BUILDKIT_VERSION}}.linux-amd64.tar.gz | sudo tar xvz -C /usr sudo buildkitd --oci-worker=true --oci-worker-net=host --debug --group docker & sudo su -c "while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done" sudo chmod +777 /run/buildkit/buildkitd.sock diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index e4475b1c4..1e5a20cc9 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -4,12 +4,13 @@ ENV RETRIGGER=3 ENV BUILDKIT_VERSION=0.11.2 ENV BUILDKIT_FILENAME=buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz +ENV DAZZLE_VERSION=0.1.15 USER root # Install dazzle, buildkit and pre-commit RUN curl -sSL https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/${BUILDKIT_FILENAME} | tar -xvz -C /usr -RUN curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.14/dazzle_0.1.14_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin +RUN curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v${DAZZLE_VERSION}/dazzle_${DAZZLE_VERSION}_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin RUN curl -sSL https://github.com/mvdan/sh/releases/download/v3.5.1/shfmt_v3.5.1_linux_amd64 -o /usr/bin/shfmt \ && chmod +x /usr/bin/shfmt RUN install-packages shellcheck \ From cf73555375d80fb9ac5cc140d58177fbf233fa2f Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Wed, 8 Feb 2023 20:01:46 +0000 Subject: [PATCH 03/17] Update to Jammy --- CONTRIBUTING.md | 2 +- base/Dockerfile | 2 +- base/install-packages | 2 +- chunks/lang-c/Dockerfile | 4 ++-- chunks/tool-tailscale/Dockerfile | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dcc9228fd..d1f106cb3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -159,7 +159,7 @@ e.g. # fetch keyring over https connection and unpack it using gpg's --dearmor option curl -fsSL https://apt.my-secure.org/my-unofficial-repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/my-unofficial-repo.gpg.key # and then add them to a apt key sources list. - echo "deb [signed-by=/usr/share/keyrings/my-unofficial-repo.gpg.key] http://apt.my-secure.org/focal/ \ + echo "deb [signed-by=/usr/share/keyrings/my-unofficial-repo.gpg.key] http://apt.my-secure.org/jammy/ \ my-unofficial-repo-toolchain main" | sudo tee /etc/apt/sources.list.d/my-unofficial-repo.list > /dev/null ``` diff --git a/base/Dockerfile b/base/Dockerfile index 17ccabca5..34e369c84 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,4 +1,4 @@ -FROM buildpack-deps:focal +FROM buildpack-deps:jammy COPY install-packages upgrade-packages /usr/bin/ diff --git a/base/install-packages b/base/install-packages index e538baad2..2f651961b 100755 --- a/base/install-packages +++ b/base/install-packages @@ -26,7 +26,7 @@ if [[ $EUID != 0 ]]; then fi # Set a runlevel to avoid invoke-rc.d warnings -# http://manpages.ubuntu.com/manpages/focal/man8/runlevel.8.html#environment +# http://manpages.ubuntu.com/manpages/jammy/man8/runlevel.8.html#environment # shellcheck disable=SC2034 RUNLEVEL=1 diff --git a/chunks/lang-c/Dockerfile b/chunks/lang-c/Dockerfile index 1f0215042..37b85b31b 100644 --- a/chunks/lang-c/Dockerfile +++ b/chunks/lang-c/Dockerfile @@ -7,8 +7,8 @@ USER root ENV TRIGGER_REBUILD=1 RUN curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/focal/ \ - llvm-toolchain-focal-15 main" | sudo tee /etc/apt/sources.list.d/llvm.list > /dev/null \ + && echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ \ + llvm-toolchain-jammy-15 main" | sudo tee /etc/apt/sources.list.d/llvm.list > /dev/null \ && apt update \ && install-packages \ clang \ diff --git a/chunks/tool-tailscale/Dockerfile b/chunks/tool-tailscale/Dockerfile index 2bdb78d20..72b0b66d2 100644 --- a/chunks/tool-tailscale/Dockerfile +++ b/chunks/tool-tailscale/Dockerfile @@ -6,8 +6,8 @@ USER root # Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer. ENV TRIGGER_REBUILD=3 -RUN curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add - \ - && curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list \ +RUN curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.gpg | sudo apt-key add - \ + && curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.list | sudo tee /etc/apt/sources.list.d/tailscale.list \ && apt-get update \ && apt-get install -y tailscale \ && rm /etc/apt/sources.list.d/tailscale.list \ From 04b1ffcdc8a9966b68116eade01e34f8167f0474 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Wed, 8 Feb 2023 20:02:10 +0000 Subject: [PATCH 04/17] Use asdf to manage Elxir and Erlang --- chunks/lang-elixir/Dockerfile | 24 +++++++++++++++++++----- tests/lang-elixir.yaml | 4 ++-- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/chunks/lang-elixir/Dockerfile b/chunks/lang-elixir/Dockerfile index 98eaabf52..f6a7cdf96 100644 --- a/chunks/lang-elixir/Dockerfile +++ b/chunks/lang-elixir/Dockerfile @@ -6,9 +6,23 @@ USER root # Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer. ENV TRIGGER_REBUILD=1 -RUN cd /tmp \ - && wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb \ - && dpkg -i erlang-solutions_2.0_all.deb \ - && install-packages elixir - USER gitpod + +# Install asdf to make it easier to manage elixir versions +# +# Why? +# 1. At the time of this writing, `apt-get install elixir` was installing +# a version that was not compatible with glibc in Ubuntu Jammy. +# 2. This makes it explicit as to what versions we're installing. +# 3. It'll give users the ability to easily make changes at runtime to experiment +RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.1 +RUN echo ". "$HOME/.asdf/asdf.sh"" >> /home/gitpod/.bashrc.d/100-asdf +RUN echo ". "$HOME/.asdf/completions/asdf.bash"" >> /home/gitpod/.bashrc.d/100-asdf +ENV PATH=/home/gitpod/.asdf/bin:/home/gitpod/.asdf/shims:$PATH + +RUN asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git +RUN asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git +RUN asdf install erlang 25.2.2 +RUN asdf install elixir 1.13.4-otp-25 +RUN asdf global erlang 25.2.2 +RUN asdf global elixir 1.13.4-otp-25 diff --git a/tests/lang-elixir.yaml b/tests/lang-elixir.yaml index f99015a87..5375fc066 100644 --- a/tests/lang-elixir.yaml +++ b/tests/lang-elixir.yaml @@ -2,5 +2,5 @@ command: [elixir,--version] assert: - status == 0 - - stdout.indexOf("Erlang/OTP 2") != -1 - - stdout.indexOf("Elixir 1.13.") != -1 + - stdout.indexOf("Erlang/OTP 25") != -1 + - stdout.indexOf("Elixir 1.13.4") != -1 From e353f613ece94b5164346ceb03db65af10c65632 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Wed, 8 Feb 2023 23:01:39 +0000 Subject: [PATCH 05/17] Go 1.18 was failing, replace with 1.20 --- chunks/lang-go/Dockerfile | 27 ++++++++++++++------------- chunks/lang-go/chunk.yaml | 6 +++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/chunks/lang-go/Dockerfile b/chunks/lang-go/Dockerfile index 23c28ef96..9abed4c7f 100644 --- a/chunks/lang-go/Dockerfile +++ b/chunks/lang-go/Dockerfile @@ -11,19 +11,20 @@ ENV GO_VERSION=${GO_VERSION} ENV GOPATH=$HOME/go-packages ENV GOROOT=$HOME/go ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH -RUN curl -fsSL https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz | tar xzs && \ +RUN curl -fsSL https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz | tar xzs # install VS Code Go tools for use with gopls as per https://github.com/golang/vscode-go/blob/master/docs/tools.md # also https://github.com/golang/vscode-go/blob/27bbf42a1523cadb19fad21e0f9d7c316b625684/src/goTools.ts#L139 - go install -v github.com/uudashr/gopkgs/cmd/gopkgs@v2 && \ - go install -v github.com/ramya-rao-a/go-outline@latest && \ - go install -v github.com/cweill/gotests/gotests@latest && \ - go install -v github.com/fatih/gomodifytags@latest && \ - go install -v github.com/josharian/impl@latest && \ - go install -v github.com/haya14busa/goplay/cmd/goplay@latest && \ - go install -v github.com/go-delve/delve/cmd/dlv@latest && \ - go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \ - go install -v golang.org/x/tools/gopls@latest && \ - go install -v honnef.co/go/tools/cmd/staticcheck@latest && \ - sudo rm -rf $GOPATH/src $GOPATH/pkg $HOME/.cache/go $HOME/.cache/go-build && \ +RUN go install -v github.com/uudashr/gopkgs/cmd/gopkgs@v2 \ +&& go install -v github.com/ramya-rao-a/go-outline@latest \ +&& go install -v github.com/cweill/gotests/gotests@latest \ +&& go install -v github.com/fatih/gomodifytags@latest \ +&& go install -v github.com/josharian/impl@latest \ +&& go install -v github.com/haya14busa/goplay/cmd/goplay@latest \ +&& go install -v github.com/go-delve/delve/cmd/dlv@latest \ +&& go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest \ +&& go install -v golang.org/x/tools/gopls@latest \ +&& go install -v honnef.co/go/tools/cmd/staticcheck@latest + +RUN sudo rm -rf $GOPATH/src $GOPATH/pkg $HOME/.cache/go $HOME/.cache/go-build && \ printf '%s\n' 'export GOPATH=/workspace/go' \ - 'export PATH=$GOPATH/bin:$PATH' > $HOME/.bashrc.d/300-go + 'export PATH=$GOPATH/bin:$PATH' > $HOME/.bashrc.d/300-go diff --git a/chunks/lang-go/chunk.yaml b/chunks/lang-go/chunk.yaml index 8826aa7b4..2da9dab9d 100644 --- a/chunks/lang-go/chunk.yaml +++ b/chunks/lang-go/chunk.yaml @@ -1,7 +1,7 @@ variants: - - name: "1.18.10" - args: - GO_VERSION: 1.18.10 - name: "1.19.5" args: GO_VERSION: 1.19.5 + - name: "1.20" + args: + GO_VERSION: 1.20 From 92554b951cd5d98062ce9c402a24c6bf051d7765 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Wed, 8 Feb 2023 23:13:23 +0000 Subject: [PATCH 06/17] Update Rust Co-authored-by: c3potheds --- chunks/lang-rust/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chunks/lang-rust/Dockerfile b/chunks/lang-rust/Dockerfile index 34f6cef9e..3cc1a1962 100644 --- a/chunks/lang-rust/Dockerfile +++ b/chunks/lang-rust/Dockerfile @@ -4,7 +4,7 @@ FROM ${base} USER gitpod # Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer. -ENV TRIGGER_REBUILD=4 +ENV TRIGGER_REBUILD=5 ENV PATH=$HOME/.cargo/bin:$PATH From 668c24039be5b9901503b34a3d59f1256a007cf7 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 9 Feb 2023 01:36:46 +0000 Subject: [PATCH 07/17] Bump Ruby --- chunks/lang-ruby/Dockerfile | 37 +++++++++++++++++++++---------------- chunks/lang-ruby/chunk.yaml | 6 +++--- tests/lang-ruby.yaml | 6 +++--- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/chunks/lang-ruby/Dockerfile b/chunks/lang-ruby/Dockerfile index 871427373..289c2bdab 100644 --- a/chunks/lang-ruby/Dockerfile +++ b/chunks/lang-ruby/Dockerfile @@ -8,19 +8,24 @@ USER gitpod # Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer. ENV TRIGGER_REBUILD=1 -RUN curl -fsSL https://rvm.io/mpapis.asc | gpg --import - \ - && curl -fsSL https://rvm.io/pkuczynski.asc | gpg --import - \ - && curl -fsSL https://get.rvm.io | bash -s stable \ - && bash -lc " \ - rvm requirements \ - && rvm install ${RUBY_VERSION} \ - && rvm use ${RUBY_VERSION} --default \ - && rvm rubygems current \ - && gem install bundler --no-document \ - && gem install solargraph --no-document" \ - && echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> /home/gitpod/.bashrc.d/70-ruby -RUN echo "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc - -ENV GEM_HOME=/workspace/.rvm -ENV GEM_PATH=$GEM_HOME:$GEM_PATH -ENV PATH=/workspace/.rvm/bin:$PATH +RUN curl -fsSL https://rvm.io/mpapis.asc | gpg --import - +RUN curl -fsSL https://rvm.io/pkuczynski.asc | gpg --import - +RUN curl -fsSL https://get.rvm.io | bash -s stable + +# ENV GEM_HOME=/home/gitpod/.rvm +# ENV GEM_PATH=$GEM_HOME:$GEM_PATH +ENV PATH=/home/gitpod/.rvm/bin:$PATH + +RUN rvm requirements + +# TODO: remove me once fixed, https://github.com/rvm/rvm/issues/5209#issuecomment-1114159447 +# another option: https://github.com/rvm/rvm/issues/5209#issuecomment-1134927685 or sudo apt install libssl-dev=1.1.1l-1ubuntu1.4 +RUN rvm pkg install openssl + +# RUN rvm install $RUBY_VERSION --with-openssl-dir=$HOME/.rvm/user +# RUN rvm use $RUBY_VERSION --default +# RUN rvm rubygems current +# RUN gem install bundler --no-document +# RUN gem install solargraph --no-document +# RUN echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> /home/gitpod/.bashrc.d/70-ruby +# RUN echo "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc diff --git a/chunks/lang-ruby/chunk.yaml b/chunks/lang-ruby/chunk.yaml index 1ca8c9f0e..2aa07df9c 100644 --- a/chunks/lang-ruby/chunk.yaml +++ b/chunks/lang-ruby/chunk.yaml @@ -1,13 +1,13 @@ variants: - name: "2.7" args: - RUBY_VERSION: 2.7.6 + RUBY_VERSION: 2.7.7 - name: "3.0" args: RUBY_VERSION: 3.0.4 - name: "3.1" args: - RUBY_VERSION: 3.1.2 + RUBY_VERSION: 3.1.3 - name: "3.2" args: - RUBY_VERSION: 3.2.0 + RUBY_VERSION: 3.2.1 diff --git a/tests/lang-ruby.yaml b/tests/lang-ruby.yaml index 75de94d76..a5e1099b7 100644 --- a/tests/lang-ruby.yaml +++ b/tests/lang-ruby.yaml @@ -4,10 +4,10 @@ assert: - status == 0 - stdout.indexOf("ruby") != -1 - - stdout.indexOf("2.7.6") != -1 || + - stdout.indexOf("2.7.7") != -1 || stdout.indexOf("3.0.4") != -1 || - stdout.indexOf("3.1.2") != -1 || - stdout.indexOf("3.2.0") != -1 + stdout.indexOf("3.1.3") != -1 || + stdout.indexOf("3.2.1") != -1 - desc: it should have rvm command: [rvm --version] entrypoint: [bash, -i, -c] From 1a6e62c677afd32a34a915576d2eec89cb4df5d2 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Wed, 1 Mar 2023 22:14:32 +0000 Subject: [PATCH 08/17] Deprecate Ruby 2.7 and update 3.0 to 3.0.5 2.7 isn't supported in Jammy, and going EOL March 31, 2023. Fix Ruby 3+. For 3.0, override the OpenSSL version. --- .github/promote-images.yml | 1 - .github/sync-containers.yml | 1 - README.md | 2 +- chunks/lang-ruby/Dockerfile | 29 +++++++++++++++-------------- chunks/lang-ruby/chunk.yaml | 5 +---- dazzle.yaml | 5 ----- tests/lang-ruby.yaml | 7 +++---- 7 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/promote-images.yml b/.github/promote-images.yml index b57f3306b..3e5b05ce0 100644 --- a/.github/promote-images.yml +++ b/.github/promote-images.yml @@ -20,7 +20,6 @@ workspace-python-3.9: "20.*" workspace-python-3.10: "20.*" workspace-python-3.11: "20.*" - workspace-ruby-2: "20.*" workspace-ruby-3: "20.*" workspace-ruby-3.0: "20.*" workspace-ruby-3.1: "20.*" diff --git a/.github/sync-containers.yml b/.github/sync-containers.yml index a7287c46a..43c2ee71a 100644 --- a/.github/sync-containers.yml +++ b/.github/sync-containers.yml @@ -17,7 +17,6 @@ sync: - python-3.9 - python-3.10 - python-3.11 - - ruby-2 - ruby-3 - ruby-3.0 - ruby-3.1 diff --git a/README.md b/README.md index 0b7de1caf..c9d8015ce 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,6 @@ Each contains a set of chunks: a common base, and a language, and includes Docke - [`gitpod/workspace-node`](https://hub.docker.com/r/gitpod/workspace-node) ✅ - [`gitpod/workspace-node-lts`](https://hub.docker.com/r/gitpod/workspace-node-lts) ✅ - [`gitpod/workspace-python`](https://hub.docker.com/r/gitpod/workspace-python) ✅ -- [`gitpod/workspace-ruby-2`](https://hub.docker.com/r/gitpod/workspace-ruby-2) ✅ - [`gitpod/workspace-ruby-3`](https://hub.docker.com/r/gitpod/workspace-ruby-3) ✅ - [`gitpod/workspace-ruby-3.0`](https://hub.docker.com/r/gitpod/workspace-ruby-3.0) ✅ - [`gitpod/workspace-ruby-3.1`](https://hub.docker.com/r/gitpod/workspace-ruby-3.1) ✅ @@ -87,6 +86,7 @@ These images are no longer being published: - gitpod/workspace-python-3.6 (please use [`gitpod/workspace-python-3.7`](https://hub.docker.com/r/gitpod/workspace-python-3.7) instead) - gitpod/workspace-postgresql (please use [`gitpod/workspace-postgres`](https://hub.docker.com/r/gitpod/workspace-postgres) instead) +- gitpod/workspace-ruby-2 (please use [`gitpod/workspace-ruby-3.2`](https://hub.docker.com/r/gitpod/workspace-ruby-3.2) instead) ## Contributing diff --git a/chunks/lang-ruby/Dockerfile b/chunks/lang-ruby/Dockerfile index 289c2bdab..95a7752ef 100644 --- a/chunks/lang-ruby/Dockerfile +++ b/chunks/lang-ruby/Dockerfile @@ -12,20 +12,21 @@ RUN curl -fsSL https://rvm.io/mpapis.asc | gpg --import - RUN curl -fsSL https://rvm.io/pkuczynski.asc | gpg --import - RUN curl -fsSL https://get.rvm.io | bash -s stable -# ENV GEM_HOME=/home/gitpod/.rvm -# ENV GEM_PATH=$GEM_HOME:$GEM_PATH +ENV GEM_HOME=/workspace/.rvm +ENV GEM_PATH=$GEM_HOME:$GEM_PATH ENV PATH=/home/gitpod/.rvm/bin:$PATH -RUN rvm requirements - -# TODO: remove me once fixed, https://github.com/rvm/rvm/issues/5209#issuecomment-1114159447 +# the version of openssl changed in Jammy, some versions of Ruby need an older version +# https://github.com/rvm/rvm/issues/5209#issuecomment-1114159447 # another option: https://github.com/rvm/rvm/issues/5209#issuecomment-1134927685 or sudo apt install libssl-dev=1.1.1l-1ubuntu1.4 -RUN rvm pkg install openssl - -# RUN rvm install $RUBY_VERSION --with-openssl-dir=$HOME/.rvm/user -# RUN rvm use $RUBY_VERSION --default -# RUN rvm rubygems current -# RUN gem install bundler --no-document -# RUN gem install solargraph --no-document -# RUN echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> /home/gitpod/.bashrc.d/70-ruby -# RUN echo "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc +RUN bash -lc " \ + rvm requirements \ + && rvm pkg install openssl \ + && rvm install ${RUBY_VERSION} --with-openssl-dir=$HOME/.rvm/usr --default \ + && rvm alias create default $RUBY_VERSION \ + && rvm rubygems current \ + && gem install bundler --no-document \ + && gem install solargraph --no-document" + +RUN echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> /home/gitpod/.bashrc.d/70-ruby +RUN echo "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc diff --git a/chunks/lang-ruby/chunk.yaml b/chunks/lang-ruby/chunk.yaml index 2aa07df9c..edfbfcca4 100644 --- a/chunks/lang-ruby/chunk.yaml +++ b/chunks/lang-ruby/chunk.yaml @@ -1,10 +1,7 @@ variants: - - name: "2.7" - args: - RUBY_VERSION: 2.7.7 - name: "3.0" args: - RUBY_VERSION: 3.0.4 + RUBY_VERSION: 3.0.5 - name: "3.1" args: RUBY_VERSION: 3.1.3 diff --git a/dazzle.yaml b/dazzle.yaml index b67f31b21..a87561122 100644 --- a/dazzle.yaml +++ b/dazzle.yaml @@ -93,11 +93,6 @@ combiner: - base chunks: - lang-python:3.11 - - name: ruby-2 - ref: - - base - chunks: - - lang-ruby:2.7 - name: ruby-3.0 ref: - base diff --git a/tests/lang-ruby.yaml b/tests/lang-ruby.yaml index a5e1099b7..858f9cc73 100644 --- a/tests/lang-ruby.yaml +++ b/tests/lang-ruby.yaml @@ -1,13 +1,12 @@ -- desc: it should run ruby +- desc: it should have ruby command: [ruby --version] entrypoint: [bash, -i, -c] assert: - - status == 0 - stdout.indexOf("ruby") != -1 - - stdout.indexOf("2.7.7") != -1 || - stdout.indexOf("3.0.4") != -1 || + - stdout.indexOf("3.0.5") != -1 || stdout.indexOf("3.1.3") != -1 || stdout.indexOf("3.2.1") != -1 + - status == 0 - desc: it should have rvm command: [rvm --version] entrypoint: [bash, -i, -c] From 0ea1c8db564a3943e3d764f230ed579edb5ad4fb Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 01:40:32 +0000 Subject: [PATCH 09/17] Fix Java tests --- tests/lang-java.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lang-java.yaml b/tests/lang-java.yaml index 476951fb0..bb72b9f13 100644 --- a/tests/lang-java.yaml +++ b/tests/lang-java.yaml @@ -6,12 +6,12 @@ - stderr.indexOf("OpenJDK") != -1 - stderr.indexOf("11.0.") != -1 || stderr.indexOf("17.0.") != -1 -- desc: it should have a functioning java 17.0.5 installed +- desc: it should have a functioning java 17.0.6 installed entrypoint: [env, GITPOD_REPO_ROOT=/workspace, bash, -ci] - command: [sdk default java 17.0.5.fx-zulu && java -version && mvn -v] + command: [sdk default java 17.0.6.fx-zulu && java -version && mvn -v] assert: - status == 0 - - stderr.indexOf('openjdk version "17.0.5"') != -1 + - stderr.indexOf('openjdk version "17.0.6"') != -1 - stdout.indexOf("Apache Maven") != -1 - desc: it should run maven command: [mvn -v] From 4f7c92673850fd4ce43a1c8dbe12e1d3633b96c7 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 03:21:15 +0000 Subject: [PATCH 10/17] Install OpenSSL conditionally for Ruby 3.0 --- chunks/lang-ruby/Dockerfile | 24 +++++++++--------------- chunks/lang-ruby/install.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 15 deletions(-) create mode 100755 chunks/lang-ruby/install.sh diff --git a/chunks/lang-ruby/Dockerfile b/chunks/lang-ruby/Dockerfile index 95a7752ef..22359f2c0 100644 --- a/chunks/lang-ruby/Dockerfile +++ b/chunks/lang-ruby/Dockerfile @@ -6,27 +6,21 @@ ARG RUBY_VERSION USER gitpod # Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer. -ENV TRIGGER_REBUILD=1 +ENV TRIGGER_REBUILD=2 RUN curl -fsSL https://rvm.io/mpapis.asc | gpg --import - RUN curl -fsSL https://rvm.io/pkuczynski.asc | gpg --import - RUN curl -fsSL https://get.rvm.io | bash -s stable -ENV GEM_HOME=/workspace/.rvm -ENV GEM_PATH=$GEM_HOME:$GEM_PATH -ENV PATH=/home/gitpod/.rvm/bin:$PATH +ADD ./install.sh /tmp +RUN /tmp/install.sh $RUBY_VERSION + + -# the version of openssl changed in Jammy, some versions of Ruby need an older version -# https://github.com/rvm/rvm/issues/5209#issuecomment-1114159447 -# another option: https://github.com/rvm/rvm/issues/5209#issuecomment-1134927685 or sudo apt install libssl-dev=1.1.1l-1ubuntu1.4 -RUN bash -lc " \ - rvm requirements \ - && rvm pkg install openssl \ - && rvm install ${RUBY_VERSION} --with-openssl-dir=$HOME/.rvm/usr --default \ - && rvm alias create default $RUBY_VERSION \ - && rvm rubygems current \ - && gem install bundler --no-document \ - && gem install solargraph --no-document" RUN echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> /home/gitpod/.bashrc.d/70-ruby RUN echo "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc + +ENV GEM_HOME=/workspace/.rvm +ENV GEM_PATH=$GEM_HOME:$GEM_PATH +ENV PATH=/home/gitpod/.rvm/bin:$PATH diff --git a/chunks/lang-ruby/install.sh b/chunks/lang-ruby/install.sh new file mode 100755 index 000000000..b011e2526 --- /dev/null +++ b/chunks/lang-ruby/install.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -euo pipefail + +RUBY_VERSION=$1 + +# the version of openssl changed in Jammy, Ruby 3.0 needs an older version +# https://github.com/rvm/rvm/issues/5209#issuecomment-1114159447 +# another option: https://github.com/rvm/rvm/issues/5209#issuecomment-1134927685 or sudo apt install libssl-dev=1.1.1l-1ubuntu1.4 +if grep -q "3.0." <<<"${RUBY_VERSION}"; then + bash -lc " + rvm requirements \ + && rvm pkg install openssl \ + && rvm install \"${RUBY_VERSION}\" --with-openssl-dir=\"${HOME}\"/.rvm/usr --default \ + && rvm alias create default \"${RUBY_VERSION}\" \ + && rvm rubygems current \ + && gem install bundler --no-document \ + && gem install solargraph --no-document" +else + # Ruby 3.1 and higher do not + bash -lc " + rvm requirements \ + && rvm install \"${RUBY_VERSION}\" --default \ + && rvm alias create default \"${RUBY_VERSION}\" \ + && rvm rubygems current \ + && gem install bundler --no-document \ + && gem install solargraph --no-document" +fi From 91e256627c24370b1a02604d87861b8370063211 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 12:03:58 +0000 Subject: [PATCH 11/17] Add cmake to tool-brew chunk Fixes https://github.com/gitpod-io/workspace-images/issues/1020 --- chunks/tool-brew/Dockerfile | 3 +-- tests/tool-brew.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/chunks/tool-brew/Dockerfile b/chunks/tool-brew/Dockerfile index 2ef91606e..a897a110d 100644 --- a/chunks/tool-brew/Dockerfile +++ b/chunks/tool-brew/Dockerfile @@ -12,5 +12,4 @@ ENV MANPATH="$MANPATH:/home/linuxbrew/.linuxbrew/share/man" ENV INFOPATH="$INFOPATH:/home/linuxbrew/.linuxbrew/share/info" ENV HOMEBREW_NO_AUTO_UPDATE=1 -RUN sudo apt remove -y cmake \ - && brew install cmake +RUN brew install cmake diff --git a/tests/tool-brew.yaml b/tests/tool-brew.yaml index a5be49972..35ca6729f 100644 --- a/tests/tool-brew.yaml +++ b/tests/tool-brew.yaml @@ -7,7 +7,13 @@ command: [brew, doctor] assert: - stderr.indexOf("error") == -1 + - status == 0 - desc: it should have valid configuration command: [brew, config] assert: - status == 0 +- desc: it should have cmake + command: [cmake, --version] + assert: + - stderr.indexOf("cmake version") == -1 + - status == 0 From 1910af6405e9493c3be1c74ce42a38fe7197faea Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 17:38:36 +0000 Subject: [PATCH 12/17] Support Mongo on Jammy --- chunks/tool-mongodb/Dockerfile | 11 ++++++++++- tests/tool-mongodb.yaml | 10 +++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/chunks/tool-mongodb/Dockerfile b/chunks/tool-mongodb/Dockerfile index b658a3d39..4b37041f6 100644 --- a/chunks/tool-mongodb/Dockerfile +++ b/chunks/tool-mongodb/Dockerfile @@ -6,11 +6,20 @@ USER gitpod # Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer. ENV TRIGGER_REBUILD=1 +# Install MongoDB Shell aka MongoSH (was part of Mongo 5, but, is separate now) +RUN mkdir -p /tmp/mongosh && \ + cd /tmp/mongosh && \ + wget -qOmongosh.tgz https://downloads.mongodb.com/compass/mongosh-1.8.0-linux-x64.tgz && \ + tar xf mongosh.tgz && \ + cd mongosh-* && \ + sudo cp bin/* /usr/local/bin/ && \ + rm -rf /tmp/mongosh + # Install MongoDB # Source: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu-tarball/#install-mongodb-community-edition RUN mkdir -p /tmp/mongodb && \ cd /tmp/mongodb && \ - wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.2.tgz && \ + wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.4.tgz && \ tar xf mongodb.tgz && \ cd mongodb-* && \ sudo cp bin/* /usr/local/bin/ && \ diff --git a/tests/tool-mongodb.yaml b/tests/tool-mongodb.yaml index cb675f11c..63adeebc9 100644 --- a/tests/tool-mongodb.yaml +++ b/tests/tool-mongodb.yaml @@ -1,12 +1,12 @@ -- desc: it should run mongodb shell - command: [mongo --version] +- desc: it should run mongosh + command: [mongosh --version] entrypoint: [bash, -i, -c] assert: - status == 0 - - stdout.indexOf("MongoDB shell version v5.0.2") != -1 -- desc: it should run mongodb shell + - stdout.indexOf("1.8.0") != -1 +- desc: it should run mongod command: [mongod --version] entrypoint: [bash, -i, -c] assert: - status == 0 - - stdout.indexOf("db version v5.0.2") != -1 + - stdout.indexOf("db version v6.0.4") != -1 From 7ea2cff7c4d05734a8bb4a3c52d3cad33f9b9350 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 18:10:55 +0000 Subject: [PATCH 13/17] Node changes * LTS from 16 to 18 * Current from 18 to 19 --- chunks/lang-node/chunk.yaml | 6 +++--- dazzle.yaml | 6 +++--- tests/lang-node.yaml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chunks/lang-node/chunk.yaml b/chunks/lang-node/chunk.yaml index f25a75455..57461943a 100644 --- a/chunks/lang-node/chunk.yaml +++ b/chunks/lang-node/chunk.yaml @@ -1,7 +1,7 @@ variants: - - name: "16" - args: - NODE_VERSION: 16.19.1 - name: "18" args: NODE_VERSION: 18.14.2 + - name: "19" + args: + NODE_VERSION: 19.7.0 diff --git a/dazzle.yaml b/dazzle.yaml index a87561122..4bed02c85 100644 --- a/dazzle.yaml +++ b/dazzle.yaml @@ -28,7 +28,7 @@ combiner: - lang-clojure - lang-go:1.19.5 - lang-java:11 - - lang-node:16 + - lang-node:18 - lang-python:3.8 - lang-ruby:3.1 - lang-rust @@ -55,13 +55,13 @@ combiner: ref: - base chunks: - - lang-node:18 + - lang-node:19 - tool-chrome - name: node-lts ref: - base chunks: - - lang-node:16 + - lang-node:18 - tool-chrome - name: python ref: diff --git a/tests/lang-node.yaml b/tests/lang-node.yaml index b994f57cc..5822c281f 100644 --- a/tests/lang-node.yaml +++ b/tests/lang-node.yaml @@ -3,8 +3,8 @@ entrypoint: [bash, -i, -c] assert: - status == 0 - - stdout.indexOf("v16") != -1 || - stdout.indexOf("v18") != -1 + - stdout.indexOf("v18") != -1 || + stdout.indexOf("v19") != -1 - desc: it should have yarn command: [yarn --version] entrypoint: [bash, -i, -c] From 0aac4e142f8676a2f3cc38d7f493d9d247b612c5 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 22:18:25 +0000 Subject: [PATCH 14/17] Fix postgresql 12 on Jammy --- chunks/tool-postgresql/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chunks/tool-postgresql/Dockerfile b/chunks/tool-postgresql/Dockerfile index 89c605c1b..9bc420120 100644 --- a/chunks/tool-postgresql/Dockerfile +++ b/chunks/tool-postgresql/Dockerfile @@ -7,7 +7,9 @@ ENV PGWORKSPACE="/workspace/.pgsql" ENV PGDATA="$PGWORKSPACE/data" # Install PostgreSQL -RUN sudo install-packages postgresql-12 postgresql-contrib-12 +RUN sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \ + wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - && \ + sudo install-packages postgresql-12 postgresql-contrib-12 # Setup PostgreSQL server for user gitpod ENV PATH="/usr/lib/postgresql/12/bin:$PATH" From c629f3df9b9b08eb33acfb46e574a72c19541bb9 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Thu, 2 Mar 2023 22:49:38 +0000 Subject: [PATCH 15/17] Patch nvm version --- chunks/lang-node/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chunks/lang-node/Dockerfile b/chunks/lang-node/Dockerfile index 09225d7a4..5c62cc550 100644 --- a/chunks/lang-node/Dockerfile +++ b/chunks/lang-node/Dockerfile @@ -12,7 +12,7 @@ ENV NODE_VERSION=${NODE_VERSION} ENV PNPM_HOME=/home/gitpod/.pnpm ENV PATH=/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin:/home/gitpod/.yarn/bin:${PNPM_HOME}:$PATH -RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | PROFILE=/dev/null bash \ +RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | PROFILE=/dev/null bash \ && bash -c ". .nvm/nvm.sh \ && nvm install v${NODE_VERSION} \ && nvm alias default v${NODE_VERSION} \ From cfc61ef4552453cbd1d567674858f68247024c97 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Fri, 3 Mar 2023 20:44:44 +0000 Subject: [PATCH 16/17] Bump Python and Ruby in gitpod/workspace-full --- dazzle.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dazzle.yaml b/dazzle.yaml index 4bed02c85..609f1f7a7 100644 --- a/dazzle.yaml +++ b/dazzle.yaml @@ -29,8 +29,8 @@ combiner: - lang-go:1.19.5 - lang-java:11 - lang-node:18 - - lang-python:3.8 - - lang-ruby:3.1 + - lang-python:3.11 + - lang-ruby:3.2 - lang-rust - tool-brew - tool-nginx From f2acc9e43b1e1255420f6cd511b658d1f3485381 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Fri, 3 Mar 2023 21:52:29 +0000 Subject: [PATCH 17/17] Fix yugabytedb on Jammy, combo not compatible with Python chunk tests --- chunks/tool-yugabytedb/Dockerfile | 12 ++++++++++++ chunks/tool-yugabytedb/chunk.yaml | 2 ++ dazzle.yaml | 24 ++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/chunks/tool-yugabytedb/Dockerfile b/chunks/tool-yugabytedb/Dockerfile index 32198efde..baffa4a0d 100644 --- a/chunks/tool-yugabytedb/Dockerfile +++ b/chunks/tool-yugabytedb/Dockerfile @@ -7,6 +7,7 @@ ARG YB_VERSION ARG YB_BUILD ARG YB_BIN_PATH=/usr/local/yugabyte ARG ROLE=gitpod +ARG PYTHON_VERSION USER $ROLE # create bin and data path @@ -22,6 +23,17 @@ RUN curl -sSLo ./yugabyte.tar.gz https://downloads.yugabyte.com/releases/${YB_VE && chmod +x $YB_BIN_PATH/bin/* \ && rm ./yugabyte.tar.gz +# python is a required dependency of ycqlsh +# but it doesn't support Python 3.10+ due to https://github.com/yugabyte/cqlsh/issues/11, install 3.9 for now +# when building yugabyte combos, if our base is full, related python chunk tests fail +# so, use base as the combo ref, add chunks, but ignore Python chunk and install manually +ENV PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH" +ENV PYENV_ROOT="$HOME/.pyenv" +RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv \ + && git -C ~/.pyenv checkout ff93c58babd813066bf2d64d004a5cee33c0f27b \ + && pyenv install ${PYTHON_VERSION} \ + && pyenv global ${PYTHON_VERSION} + # configure the interpreter RUN ["/usr/local/yugabyte/bin/post_install.sh"] diff --git a/chunks/tool-yugabytedb/chunk.yaml b/chunks/tool-yugabytedb/chunk.yaml index f5850991e..82e5b3ca2 100644 --- a/chunks/tool-yugabytedb/chunk.yaml +++ b/chunks/tool-yugabytedb/chunk.yaml @@ -3,7 +3,9 @@ variants: args: YB_VERSION: 2.14.0.0 YB_BUILD: 94 + PYTHON_VERSION: 3.9 - name: "2.15" args: YB_VERSION: 2.15.0.1 YB_BUILD: 4 + PYTHON_VERSION: 3.9 diff --git a/dazzle.yaml b/dazzle.yaml index 609f1f7a7..90057d4c6 100644 --- a/dazzle.yaml +++ b/dazzle.yaml @@ -150,13 +150,33 @@ combiner: - lang-java:17 - name: yugabytedb ref: - - full + - base chunks: + - lang-c + - lang-clojure + - lang-go:1.19.5 + - lang-java:11 + - lang-node:18 + - lang-ruby:3.2 + - lang-rust + - tool-brew + - tool-nginx + - tool-nix:2.11.0 - tool-yugabytedb:2.14 - name: yugabytedb-preview ref: - - full + - base chunks: + - lang-c + - lang-clojure + - lang-go:1.19.5 + - lang-java:11 + - lang-node:18 + - lang-ruby:3.2 + - lang-rust + - tool-brew + - tool-nginx + - tool-nix:2.11.0 - tool-yugabytedb:2.15 envvars: - name: PATH