Skip to content

Commit 1b7a415

Browse files
authored
feat(targets): Builds a golang image now. (#154)
* feat(docker): First golang version. * feat(dependencies): Tracks Gitpod full workspace docker image. * feat(dependencies): Added golang and an action. * chore(dependencies): Pinned version of workspace-full. * chore(dependencies): Added golang. * feat(dependencies): Added debian. * fix(dependencies): POSIX. * fix(dependencies): POSIX. * feat(dependencies): Tracks golang version. * fix(dependencies): "scmid: default" is mandatory. Or you won't get a PR. * fix(dependencies): mapping key "scmid" already defined at line 35 * fix(dependencies): mapping key "scmid" already defined at line 35 * feat(targets): Adding golang.
1 parent 42ecff3 commit 1b7a415

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/github-docker-registry-push.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,13 @@ jobs:
134134
context: ./dockerfiles/android
135135
platforms: linux/amd64
136136
push: true
137-
tags: ghcr.io/${{ env.REPO_NAME }}/jenkinsci-tutorials:android_${{ env.BRANCH }}
137+
tags: ghcr.io/${{ env.REPO_NAME }}/jenkinsci-tutorials:android_${{ env.BRANCH }}
138+
139+
- name: Build and push the jenkins agent for golang tutorial
140+
if: contains(env.files, 'dockerfiles/golang/Dockerfile')
141+
uses: docker/build-push-action@v5
142+
with:
143+
context: ./dockerfiles/golang
144+
platforms: linux/amd64, linux/arm64
145+
push: true
146+
tags: ghcr.io/${{ env.REPO_NAME }}/jenkinsci-tutorials:golang_${{ env.BRANCH }}

docker-compose.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,28 @@ services:
168168
retries: 5
169169
volumes:
170170
- agent-ssh-dir:/home/jenkins/.ssh:ro # Mounts the agent-ssh-dir volume to the /home/jenkins/.ssh path inside the container as read-only
171+
golang:
172+
image: ${IMAGE_PREFIX}/${GHCR_USERNAME}/quickstart-tutorials/jenkinsci-tutorials:golang_${BRANCH_SUFFIX}
173+
environment:
174+
- GITPOD_WORKSPACE_URL=${GITPOD_WORKSPACE_URL}
175+
container_name: desktop-jenkins_agent-1
176+
profiles:
177+
- golang
178+
depends_on:
179+
sidekick_service:
180+
condition: service_completed_successfully # Depends on the successful completion of the sidekick_service
181+
jenkins_controller:
182+
condition: service_started
183+
ports:
184+
- "3000:3000"
185+
healthcheck:
186+
test: ["CMD-SHELL", "[ -f /home/jenkins/.ssh/authorized_keys ] || exit 1"]
187+
# Checks if the authorized_keys file exists in the /home/jenkins/.ssh path
188+
interval: 5s
189+
timeout: 10s
190+
retries: 5
191+
volumes:
192+
- agent-ssh-dir:/home/jenkins/.ssh:ro # Mounts the agent-ssh-dir volume to the /home/jenkins/.ssh path inside the container as read-only
171193
volumes:
172194
jenkins_home: null
173195
agent-ssh-dir:

0 commit comments

Comments
 (0)