Skip to content

Commit 9c68f60

Browse files
committed
Remove the go implementation of pathservice
Path service is re-implemented within the UI code. Signed-off-by: Anil Vishnoi <[email protected]>
1 parent 511875e commit 9c68f60

File tree

26 files changed

+15
-901
lines changed

26 files changed

+15
-901
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ docs/
1616
certificates/
1717
server/
1818
.github/
19-
./pathservice/taxonomy/
2019
node_modules/

.github/dependabot.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ updates:
5454
actions-deps:
5555
patterns:
5656
- "*"
57-
- package-ecosystem: "gomod"
58-
directory: "/pathservice"
59-
schedule:
60-
interval: "weekly"
61-
reviewers:
62-
- "instructlab/ui-maintainers"
63-
target-branch: "main"
64-
labels:
65-
- "go dependencies"
6657
- package-ecosystem: "docker"
6758
directory: "/"
6859
schedule:
@@ -127,15 +118,6 @@ updates:
127118
actions-deps:
128119
patterns:
129120
- "*"
130-
- package-ecosystem: "gomod"
131-
directory: "/pathservice"
132-
schedule:
133-
interval: "weekly"
134-
reviewers:
135-
- "instructlab/ui-maintainers"
136-
target-branch: "release-1.0"
137-
labels:
138-
- "go dependencies"
139121
- package-ecosystem: "docker"
140122
directory: "/"
141123
schedule:

.github/workflows/pr-images.yml

Lines changed: 0 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ env:
1010
GHCR_UI_IMAGE_NAME: "${{ github.repository }}/ui"
1111
QUAY_REGISTRY: quay.io
1212
QUAY_UI_IMAGE_NAME: instructlab-ui/ui
13-
GHCR_PS_IMAGE_NAME: "${{ github.repository }}/pathservice"
14-
QUAY_PS_IMAGE_NAME: instructlab-ui/pathservice
1513

1614
jobs:
1715
build_and_publish_ui_qa_image:
@@ -187,178 +185,3 @@ jobs:
187185
git add deploy/k8s/overlays/openshift/qa/kustomization.yaml
188186
git commit -m "[CI AUTOMATION]: Bumping QA UI image to tag: pr-${{ steps.get_pr_number.outputs.result }}" -s
189187
git push origin main
190-
191-
build_and_publish_ps_qa_image:
192-
name: Push QA pathservice container image to GHCR and QUAY
193-
runs-on: ubuntu-22.04
194-
environment: registry-creds
195-
permissions:
196-
packages: write
197-
contents: write
198-
attestations: write
199-
id-token: write
200-
201-
steps:
202-
- name: Check out the repo
203-
uses: actions/checkout@v4
204-
with:
205-
token: ${{ secrets.BOT_PAT }}
206-
ref: 'main'
207-
208-
- name: Skip if triggered by GitHub Actions bot
209-
id: check_skip
210-
run: |-
211-
if [[ "$(git log -1 --pretty=format:'%s')" == *"[CI AUTOMATION]:"* ]]; then
212-
echo "Workflow triggered by previous action commit. Skipping."
213-
echo "SKIP_WORKFLOW=true" >> "$GITHUB_ENV"
214-
else
215-
echo "SKIP_WORKFLOW=false" >> "$GITHUB_ENV"
216-
fi
217-
218-
- name: Log in to the GHCR container image registry
219-
if: env.SKIP_WORKFLOW == 'false'
220-
uses: docker/login-action@v3
221-
with:
222-
registry: ${{ env.GHCR_REGISTRY }}
223-
username: ${{ github.actor }}
224-
password: ${{ secrets.GITHUB_TOKEN }}
225-
226-
- name: Log in to the Quay container image registry
227-
if: env.SKIP_WORKFLOW == 'false'
228-
uses: docker/login-action@v3
229-
with:
230-
registry: ${{ env.QUAY_REGISTRY }}
231-
username: ${{ secrets.QUAY_USERNAME }}
232-
password: ${{ secrets.QUAY_TOKEN }}
233-
234-
- name: Set up Docker Buildx
235-
if: env.SKIP_WORKFLOW == 'false'
236-
uses: docker/setup-buildx-action@v3
237-
238-
- name: Cache Docker layers
239-
if: env.SKIP_WORKFLOW == 'false'
240-
uses: actions/cache@v4
241-
with:
242-
path: /tmp/.buildx-cache
243-
key: ${{ runner.os }}-buildx-${{ github.sha }}
244-
restore-keys: |
245-
${{ runner.os }}-buildx-
246-
247-
- name: Get Pull Request Number from Commit
248-
if: env.SKIP_WORKFLOW == 'false'
249-
id: get_pr_number
250-
uses: actions/github-script@v7
251-
with:
252-
script: |
253-
console.log("Repository owner:", context.repo.owner);
254-
console.log("Repository name:", context.repo.repo);
255-
console.log("Current commit SHA:", context.sha);
256-
257-
const prs = await github.rest.pulls.list({
258-
owner: context.repo.owner,
259-
repo: context.repo.repo,
260-
state: 'closed',
261-
sort: 'updated',
262-
direction: 'desc'
263-
});
264-
console.log("Number of closed PRs fetched:", prs.data.length);
265-
266-
for (const pr of prs.data) {
267-
console.log("Checking PR #", pr.number, "- Merged:");
268-
if (pr.merged_at != "") {
269-
console.log("Found merged PR:", pr.number);
270-
return pr.number;
271-
}
272-
}
273-
274-
console.log("No merged PR found in the recent closed PRs.");
275-
return '';
276-
277-
- name: Extract metadata (tags, labels) for pathservice image
278-
if: env.SKIP_WORKFLOW == 'false'
279-
id: ghcr_ps_meta
280-
uses: docker/metadata-action@v5
281-
with:
282-
images: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_PS_IMAGE_NAME }}
283-
284-
- name: Extract metadata (tags, labels) for pathservice image
285-
if: env.SKIP_WORKFLOW == 'false'
286-
id: quay_ps_meta
287-
uses: docker/metadata-action@v5
288-
with:
289-
images: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_PS_IMAGE_NAME }}
290-
291-
- name: Build and push QA PS image to ghcr.io
292-
if: env.SKIP_WORKFLOW == 'false'
293-
id: push-ps-ghcr
294-
uses: docker/build-push-action@v6
295-
with:
296-
context: .
297-
push: true
298-
tags: |
299-
"${{ steps.ghcr_ps_meta.outputs.tags }}"
300-
"${{ env.GHCR_REGISTRY }}/${{ env.GHCR_PS_IMAGE_NAME }}:pr-${{ steps.get_pr_number.outputs.result }}"
301-
labels: ${{ steps.ghcr_ps_meta.outputs.labels }}
302-
platforms: linux/amd64,linux/arm64
303-
cache-from: type=gha
304-
cache-to: type=gha,mode=max
305-
file: pathservice/Containerfile
306-
307-
- name: Generate QA PS GHCR artifact attestation
308-
if: env.SKIP_WORKFLOW == 'false'
309-
uses: actions/attest-build-provenance@v2
310-
with:
311-
subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_PS_IMAGE_NAME}}
312-
subject-digest: ${{ steps.push-ps-ghcr.outputs.digest }}
313-
push-to-registry: true
314-
315-
- name: Build and push QA PS image to quay.io
316-
if: env.SKIP_WORKFLOW == 'false'
317-
id: push-ps-quay
318-
uses: docker/build-push-action@v6
319-
with:
320-
context: .
321-
push: true
322-
tags: |
323-
"${{ steps.quay_ps_meta.outputs.tags }}"
324-
"${{ env.QUAY_REGISTRY }}/${{ env.QUAY_PS_IMAGE_NAME }}:pr-${{ steps.get_pr_number.outputs.result }}"
325-
labels: ${{ steps.quay_ps_meta.outputs.labels }}
326-
platforms: linux/amd64,linux/arm64
327-
cache-from: type=gha
328-
cache-to: type=gha,mode=max
329-
file: pathservice/Containerfile
330-
331-
- name: Generate QA PS Quay artifact attestation
332-
if: env.SKIP_WORKFLOW == 'false'
333-
uses: actions/attest-build-provenance@v2
334-
with:
335-
subject-name: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_PS_IMAGE_NAME}}
336-
subject-digest: ${{ steps.push-ps-quay.outputs.digest }}
337-
push-to-registry: true
338-
339-
340-
- name: Update coderefs before code changes
341-
if: env.SKIP_WORKFLOW == 'false'
342-
run: |-
343-
git pull --ff-only
344-
345-
- name: Update QA PS Quay image
346-
if: env.SKIP_WORKFLOW == 'false'
347-
id: update_qa_ps_manifest_image
348-
env:
349-
PR_TAG: "pr-${{ steps.get_pr_number.outputs.result }}"
350-
run: |-
351-
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/local/bin/yq
352-
sudo chmod +x /usr/local/bin/yq
353-
yq -i '
354-
(.images[] | select(.name == "quay.io/${{env.QUAY_PS_IMAGE_NAME}}") | .newTag) = env(PR_TAG)
355-
' deploy/k8s/overlays/openshift/qa/kustomization.yaml
356-
357-
- name: Commit and push bump QA PS Image manifest
358-
if: env.SKIP_WORKFLOW == 'false'
359-
run: |-
360-
git config user.name "platform-engineering-bot"
361-
git config user.email "[email protected]"
362-
git add deploy/k8s/overlays/openshift/qa/kustomization.yaml
363-
git commit -m "[CI AUTOMATION]: Bumping QA PS image to tag: pr-${{ steps.get_pr_number.outputs.result }}" -s
364-
git push origin main

.github/workflows/release-images.yml

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ on:
66
env:
77
GHCR_REGISTRY: ghcr.io
88
GHCR_UI_IMAGE_NAME: ${{ github.repository }}/ui
9-
GHCR_PS_IMAGE_NAME: ${{ github.repository }}/pathservice
109
QUAY_REGISTRY: quay.io
1110
QUAY_UI_IMAGE_NAME: instructlab-ui/ui
12-
QUAY_PS_IMAGE_NAME: instructlab-ui/pathservice
1311

1412
jobs:
1513
build_and_publish_ui_prod_image:
@@ -131,123 +129,3 @@ jobs:
131129
git add deploy/k8s/overlays/openshift/prod/kustomization.yaml
132130
git commit -m "[CI AUTOMATION]: Bumping Prod UI image to tag: ${{ github.event.release.tag_name }}" -s
133131
git push origin main
134-
135-
build_and_publish_ps_prod_image:
136-
name: Push pathservice container image to GHCR and QUAY
137-
runs-on: ubuntu-22.04
138-
environment: registry-creds
139-
permissions:
140-
packages: write
141-
contents: write
142-
attestations: write
143-
id-token: write
144-
145-
steps:
146-
- name: Check out the repo
147-
uses: actions/checkout@v4
148-
149-
- name: Log in to the GHCR container image registry
150-
uses: docker/login-action@v3
151-
with:
152-
registry: ${{ env.GHCR_REGISTRY }}
153-
username: ${{ github.actor }}
154-
password: ${{ secrets.GITHUB_TOKEN }}
155-
156-
- name: Log in to the Quay container image registry
157-
uses: docker/login-action@v3
158-
with:
159-
registry: ${{ env.QUAY_REGISTRY }}
160-
username: ${{ secrets.QUAY_USERNAME }}
161-
password: ${{ secrets.QUAY_TOKEN }}
162-
163-
- name: Set up Docker Buildx
164-
uses: docker/setup-buildx-action@v3
165-
166-
- name: Cache Docker layers
167-
uses: actions/cache@v4
168-
with:
169-
path: /tmp/.buildx-cache
170-
key: ${{ runner.os }}-buildx-${{ github.sha }}
171-
restore-keys: |
172-
${{ runner.os }}-buildx-
173-
174-
- name: Extract metadata (tags, labels) for PS image
175-
id: ghcr_ps_meta
176-
uses: docker/metadata-action@v5
177-
with:
178-
images: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_PS_IMAGE_NAME }}
179-
180-
- name: Extract metadata (tags, labels) for PS image
181-
id: quay_ps_meta
182-
uses: docker/metadata-action@v5
183-
with:
184-
images: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_PS_IMAGE_NAME }}
185-
186-
- name: Build and push ps image to ghcr.io
187-
id: push-ps-ghcr
188-
uses: docker/build-push-action@v6
189-
with:
190-
context: .
191-
push: true
192-
tags: ${{ steps.ghcr_ps_meta.outputs.tags }}
193-
labels: ${{ steps.ghcr_ps_meta.outputs.labels }}
194-
platforms: linux/amd64,linux/arm64
195-
cache-from: type=gha
196-
cache-to: type=gha,mode=max
197-
file: pathservice/Containerfile
198-
199-
- name: Generate GHCR PS Image attestation
200-
uses: actions/attest-build-provenance@v2
201-
with:
202-
subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_PS_IMAGE_NAME}}
203-
subject-digest: ${{ steps.push-ps-ghcr.outputs.digest }}
204-
push-to-registry: true
205-
206-
- name: Build and push PS image to Quay.io
207-
id: push-ps-quay
208-
uses: docker/build-push-action@v6
209-
with:
210-
context: .
211-
push: true
212-
tags: ${{ steps.quay_ps_meta.outputs.tags }}
213-
labels: ${{ steps.quay_ps_meta.outputs.labels }}
214-
platforms: linux/amd64,linux/arm64
215-
cache-from: type=gha
216-
cache-to: type=gha,mode=max
217-
file: pathservice/Containerfile
218-
219-
- name: Generate Quay PS Image attestation
220-
uses: actions/attest-build-provenance@v2
221-
with:
222-
subject-name: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_PS_IMAGE_NAME}}
223-
subject-digest: ${{ steps.push-ps-quay.outputs.digest }}
224-
push-to-registry: true
225-
226-
- name: Checkout main on the repo
227-
uses: actions/checkout@v4
228-
with:
229-
token: ${{ secrets.BOT_PAT }}
230-
ref: main
231-
232-
- name: Update coderefs before code changes
233-
run: |-
234-
git pull --ff-only
235-
236-
- name: Update Prod Quay PS image
237-
id: update_prod_ps_manifest_image
238-
env:
239-
RELEASE_TAG: ${{ github.event.release.tag_name }}
240-
run: |-
241-
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/local/bin/yq
242-
sudo chmod +x /usr/local/bin/yq
243-
yq -i '
244-
(.images[] | select(.name == "quay.io/instructlab-ui/pathservice") | .newTag) = env(RELEASE_TAG)
245-
' deploy/k8s/overlays/openshift/prod/kustomization.yaml
246-
247-
- name: Commit and push bump to Prod PS image manifest
248-
run: |-
249-
git config user.name "platform-engineering-bot"
250-
git config user.email "[email protected]"
251-
git add deploy/k8s/overlays/openshift/prod/kustomization.yaml
252-
git commit -m "[CI AUTOMATION]: Bumping Prod PS image to tag: ${{ github.event.release.tag_name }}" -s
253-
git push origin main

Makefiles/containers-base/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ ui-image: validate-container-engine src/Containerfile ## Build container image f
3434
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/ui:$(TAG) quay.io/instructlab-ui/ui:main
3535
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/ui:$(TAG) ghcr.io/instructlab/ui/ui:main
3636

37-
ps-image: validate-container-engine pathservice/Containerfile ## Build container image for the InstructLab PathService
38-
$(ECHO_PREFIX) printf " %-12s pathservice/Containerfile\n" "[$(CONTAINER_ENGINE)]"
39-
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f pathservice/Containerfile -t quay.io/instructlab-ui/pathservice:$(TAG) .
40-
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/pathservice:$(TAG) quay.io/instructlab-ui/pathservice:main
41-
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/pathservice:$(TAG) ghcr.io/instructlab/ui/pathservice:main
42-
4337
healthcheck-sidecar-image: validate-container-engine healthcheck-sidecar/Containerfile ## Build container image for the InstructLab Healthcheck-Sidecar
4438
$(ECHO_PREFIX) printf " %-12s healthcheck-sidecar/Containerfile\n" "[$(CONTAINER_ENGINE)]"
4539
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f healthcheck-sidecar/Containerfile -t quay.io/instructlab-ui/healthcheck-sidecar:$(TAG) healthcheck-sidecar

0 commit comments

Comments
 (0)