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

add Accelerator #7

Open
wants to merge 4 commits into
base: main
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
4 changes: 3 additions & 1 deletion 23.0.x/cb4ba-pipeline-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
value: "5.1.2"
- name: namespace
value: "cp4ba-starter"
- name: mode
value: "starter"
workspaces:
- name: ws
volumeClaimTemplate:
Expand All @@ -23,4 +25,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 1Gi
58 changes: 57 additions & 1 deletion 23.0.x/cp4ba-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ spec:
- name: namespace
type: string
default: "cp4ba-starter"
- default: starter
name: mode
type: string
workspaces:
- name: ws
tasks:
Expand Down Expand Up @@ -315,6 +318,59 @@ spec:
done

echo "Certs updated!"
- name: deploy-accelerator
runAfter:
- create-config-accelerator
params:
- name: namespace
value: $(params.namespace)
taskSpec:
metadata: {}
params:
- name: namespace
type: string
spec: null
steps:
- computeResources: {}
image: 'quay.io/ibmtz/ibm-pak-ubi:latest'
name: git-clone-step
script: |
curl -s https://raw.githubusercontent.com/MalekJabri/CP4AAccelerator/main/deploy-cp4accelerator.yaml > accelerator.yaml
yq -e '.metadata.namespace = "$(params.namespace)"' -i accelerator.yaml
oc apply -f accelerator.yaml

curl -s https://raw.githubusercontent.com/MalekJabri/CP4AAccelerator/main/RoleBiding.yaml > rolebiding.yaml
yq -e '.subjects[0].namespace ="$(params.namespace)"' -i rolebiding.yaml
oc apply -f rolebiding.yaml
workspaces:
- name: ws
workspaces:
- name: ws
workspace: ws
- name: create-config-accelerator
runAfter:
- add-namespace
- get-ibm-entitlement-key
params:
- name: SCRIPT
value: |
oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: cp4accelerator-cm
namespace: $(params.namespace)
data:
connection.properties: |
namespace=$(params.namespace)
masterUrl=http
mode=$(params.mode)
EOF
taskRef:
kind: Task
name: ibm-pak


finally:
- name: loginorcleanup
retries: 5
Expand Down Expand Up @@ -369,4 +425,4 @@ spec:
echo "CP4BA uninstall successfully. Please rerun this pipeline to reinstall."
workspaces:
- name: ws
workspace: ws
workspace: ws