Skip to content

Commit 7f1af2c

Browse files
committed
TODO fix buildah
1 parent 2f15c21 commit 7f1af2c

File tree

3 files changed

+374
-27
lines changed

3 files changed

+374
-27
lines changed

deploy/tekton/deploy-user-namespace.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,23 @@ deploy_resources_only() {
451451
deploy_with_namespace "tasks.yaml" "📝 Deploying Tasks..."
452452
deploy_with_namespace "pipeline.yaml" "🔄 Deploying Pipeline..."
453453
deploy_with_namespace "triggers.yaml" "⚡ Deploying Triggers..."
454+
455+
# Create the application configuration configmap
456+
echo -e "${GREEN}⚙️ Creating application configuration...${NC}"
457+
oc create configmap ${USERNAME}-ci-analysis-config \
458+
--from-literal=OLLAMA_API_BASE="http://${USERNAME}-ollama-service:11434" \
459+
--from-literal=GOOGLE_GENAI_USE_VERTEXAI="FALSE" \
460+
--from-literal=PYTHONPATH="/app" \
461+
-n $NAMESPACE \
462+
--dry-run=client -o yaml | oc apply -f -
463+
464+
# Grant SCC permissions for container builds (persistent)
465+
echo -e "${GREEN}🔐 Configuring Security Context Constraints for buildah...${NC}"
466+
if ! oc adm policy add-scc-to-user pipelines-scc system:serviceaccount:${NAMESPACE}:pipeline-service-account &> /dev/null; then
467+
echo -e "${YELLOW}⚠️ SCC policy may already be applied or cluster permissions insufficient${NC}"
468+
else
469+
echo -e "${GREEN}✅ SCC permissions configured successfully${NC}"
470+
fi
454471

455472
# Note: pipeline-run.yaml is a template file, not deployed directly
456473
echo -e "${GREEN}📄 Pipeline Run template available for use${NC}"

deploy/tekton/pipeline.yaml

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,42 +48,37 @@ spec:
4848
tasks:
4949
- name: git-clone
5050
taskRef:
51-
name: git-clone
52-
kind: ClusterTask
53-
apiVersion: tekton.dev/v1beta1
51+
resolver: cluster
52+
params:
53+
- name: kind
54+
value: task
55+
- name: name
56+
value: git-clone
57+
- name: namespace
58+
value: openshift-pipelines
5459
workspaces:
5560
- name: output
5661
workspace: shared-data
5762
params:
58-
- name: url
63+
- name: URL
5964
value: $(params.git-url)
60-
- name: revision
65+
- name: REVISION
6166
value: $(params.git-revision)
62-
- name: deleteExisting
67+
- name: DELETE_EXISTING
6368
value: "true"
6469

65-
- name: create-namespace
66-
taskRef:
67-
name: create-namespace
68-
apiVersion: tekton.dev/v1beta1
69-
runAfter:
70-
- git-clone
71-
workspaces:
72-
- name: source
73-
workspace: shared-data
74-
params:
75-
- name: target-namespace
76-
value: $(params.target-namespace)
77-
- name: user-prefix
78-
value: $(params.user-prefix)
79-
8070
- name: build-image
8171
taskRef:
82-
name: buildah
83-
kind: ClusterTask
84-
apiVersion: tekton.dev/v1beta1
72+
resolver: cluster
73+
params:
74+
- name: kind
75+
value: task
76+
- name: name
77+
value: buildah
78+
- name: namespace
79+
value: openshift-pipelines
8580
runAfter:
86-
- create-namespace
81+
- git-clone
8782
workspaces:
8883
- name: source
8984
workspace: shared-data
@@ -96,8 +91,6 @@ spec:
9691
value: ./Dockerfile
9792
- name: CONTEXT
9893
value: .
99-
- name: TLSVERIFY
100-
value: "false"
10194

10295
- name: deploy-ollama
10396
taskRef:

0 commit comments

Comments
 (0)