Skip to content

Instantly share code, notes, and snippets.

@cmoulliard
Last active April 14, 2023 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmoulliard/f31375d12af0e1da8c0afa2715d3ac75 to your computer and use it in GitHub Desktop.
Save cmoulliard/f31375d12af0e1da8c0afa2715d3ac75 to your computer and use it in GitHub Desktop.
RHTAP & Gosmee to custom pipelines

Stonesoup k8s objects

k get all -n user1-tenant
ktree -n user1-tenant components/stonesoup-spring-boot-hdv4
ktree -n user1-tenant applications.v1alpha1.appstudio.redhat.com my-app

Gosmee

k delete -n pipelines-as-code deployment/gosmee-client
cat <<'EOF' | k apply -f -
kind: Deployment
apiVersion: apps/v1
metadata:
  name: gosmee-client
  namespace: pipelines-as-code
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gosmee-client
  template:
    metadata:
      labels:
        app: gosmee-client
    spec:
      containers:
        - name: gosmee-client
          image: 'ghcr.io/chmouel/gosmee:main'
          args:
            - client
            - 'https://smee.io/upi-0.apps.mystone.lab.upshift.rdu2.redhat.com'
            - $(SVC)
          env:
            - name: SVC
              value: >-
                        http://pipelines-as-code-controller.pipelines-as-code.svc.cluster.local:8080
      restartPolicy: Always
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600      
EOF

### To update images
./hack/find-latest-images
git commit -m "Updating the images to be used for the frontend and adding the missing field needed to configure the controller manager" -a
git push --set-upstream origin test

./hack/preview.sh

To check images

k get pods -n boot -ojson | jq -r '.items[].spec.containers[].image'
quay.io/cloudservices/insights-chrome-frontend:078e645
quay.io/jduimovich0/crc-k8s-proxy
quay.io/cloudservices/hac-core-frontend:b743213
quay.io/cloudservices/hac-dev-frontend:0396220


https://upi-0.apps.mystone.lab.upshift.rdu2.redhat.com/hac/stonesoup#error=invalid_scope&error_description=Invalid+scopes%3A+openid+nameandterms&state=1d8c1153-adfa-4264-8147-36bb0334f3d4


docker_io_auth="cmoulliard:dckr_pat_PkR5WbHkNxlthe0QyOeeFRwzH4A"
oc registry login --registry=docker.io --auth-basic="$docker_io_auth" --to=docker_hub.cfg
k delete secret/pipeline-dockercfg-njgjt -n user1-tenant
k create secret docker-registry pipeline-dockercfg-njgjt -n user1-tenant --from-file=.dockerconfigjson=./docker_hub.cfg

git checkout main
git pull remote
BRANCH=test
git branch -D $BRANCH
git checkout -b test
export SOUP_HOSTNAME=upi-0.apps.mystone.lab.upshift.rdu2.redhat.com
./hack/find-latest-images ; git add . ; git commit -m "new images" ; ./hack/preview.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment