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

Update gopls and kubedock #749

Open
wants to merge 2 commits into
base: devspaces-3.20-rhel-9
Choose a base branch
from
Open
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
15 changes: 7 additions & 8 deletions devspaces-udi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
# Red Hat, Inc. - initial API and implementation

# use rhel9/ for Brew, not ubi9/
# can pin to specific tag filter using rhel8/go-toolset#^1.17
# https://registry.access.redhat.com/ubi9/go-toolset
FROM registry.redhat.io/ubi9/go-toolset:9.5-1743582279 as go-builder
#@follow_tag(registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:rhel_9_1.23)
FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.23.6-202503041452.g6c23478.el9 AS go-builder
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the builder image because go 1.23.4 is required to build gopls and kubedock


USER root

Expand All @@ -29,7 +28,7 @@ RUN \
echo 'replace golang.org/x/tools => ../' >> go.mod && \
# build gopls application with dependencies resolved by Cachito (which are also resolved for 'tools' dependency)
source $REMOTE_SOURCES_DIR/gopls/cachito.env && \
GO111MODULE=on go build -o gopls && \
GO111MODULE=on go build -mod=mod -o gopls && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added because there was an error with gomod vendoring when:

remote_sources_version: 2

in container.yaml.

./gopls version && \
# END Gopls

Expand All @@ -38,10 +37,10 @@ RUN \
# build kubedock application with dependencies resolved by Cachito
source $REMOTE_SOURCES_DIR/kubedock/cachito.env && \
LDFLAGS="-X github.com/joyrex2001/kubedock/internal/config.Date=`date -u +%Y%m%d-%H%M%S` \
-X github.com/joyrex2001/kubedock/internal/config.Build=9d21955b52e4905d916d24e724dcad195aef3515 \
-X github.com/joyrex2001/kubedock/internal/config.Version=0.11.0 \
-X github.com/joyrex2001/kubedock/internal/config.Image=joyrex2001/kubedock:0.11.0" && \
CGO_ENABLED=0 go build -ldflags "${LDFLAGS}" -o kubedock && \
-X github.com/joyrex2001/kubedock/internal/config.Build=88fd5414d15f69468d5090ac1b978fbebafae434 \
-X github.com/joyrex2001/kubedock/internal/config.Version=0.18.1 \
-X github.com/joyrex2001/kubedock/internal/config.Image=joyrex2001/kubedock:0.18.1" && \
CGO_ENABLED=0 go build -mod=mod -ldflags "${LDFLAGS}" -o kubedock && \
chmod +x ./kubedock && \
./kubedock version && \
# END Kubedock
Expand Down
11 changes: 6 additions & 5 deletions devspaces-udi/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ compose:

# instead of docker_api, use imagebuilder for multistage builds
image_build_method: imagebuilder
remote_sources_version: 2
remote_sources:

# https://issues.redhat.com/browse/CRW-3531 use gopls 0.10.1 as we can now build with go 1.18
# https://github.com/golang/tools/releases/tag/gopls%2Fv0.10.1 ==> https://github.com/golang/tools/commit/8321f7bbcfd30300762661ed9188226b42e27ec1
# use gopls 0.18.1 as we can now build with go 1.23
# https://github.com/golang/tools/releases/tag/gopls%2Fv0.18.1 ==> https://github.com/golang/tools/commit/0b62b3fcb903046d1ed6e0c50a94871e9fdcae2a
# use https://github.com/redhat-developer/devspaces/blob/devspaces-3-rhel-9/dependencies/job-config.json#L866-L869 (.Other.gopls)
- name: gopls
remote_source:
repo: https://github.com/golang/tools
ref: 8321f7bbcfd30300762661ed9188226b42e27ec1
ref: 0b62b3fcb903046d1ed6e0c50a94871e9fdcae2a
pkg_managers:
- gomod
packages: {"gomod": [{"path": "."}, {"path": "gopls"}]}
Expand Down Expand Up @@ -58,11 +59,11 @@ remote_sources:
# - gomod
# packages: {"gomod": [ "path": "." ]}

# https://github.com/joyrex2001/kubedock/releases/tag/0.11.0 => https://github.com/joyrex2001/kubedock/commit/9d21955b52e4905d916d24e724dcad195aef3515
# https://github.com/joyrex2001/kubedock/releases/tag/0.18.1 => https://github.com/joyrex2001/kubedock/commit/88fd5414d15f69468d5090ac1b978fbebafae434
- name: kubedock
remote_source:
repo: https://github.com/joyrex2001/kubedock
ref: 9d21955b52e4905d916d24e724dcad195aef3515
ref: 88fd5414d15f69468d5090ac1b978fbebafae434
pkg_managers:
- gomod

Expand Down