chore: fix domain in pipiline

This commit is contained in:
Jesús Pérez Lorenzo 2021-06-23 06:24:26 +01:00
parent ee313c14b1
commit 98ac2b0cb9
7 changed files with 38 additions and 22 deletions

View file

@ -2,7 +2,7 @@ kind: PersistentVolume
apiVersion: v1
metadata:
name: cdci-webhook-pipeline-pvc-volume
namespace: cdci-librecloud-services
namespace: cdci-librecloud-online
labels:
type: local
spec:
@ -19,7 +19,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: cdci-webhook-pipeline-pvc
namespace: cdci-librecloud-services
namespace: cdci-librecloud-online
spec:
storageClassName: manual
accessModes:

View file

@ -2,23 +2,23 @@ apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: librecloud-webhook-pipeline-img
namespace: cdci-librecloud-services
namespace: cdci-librecloud-online
spec:
type: image
params:
- name: url
value: termas.librecloud.services/termas_librecloud/webhook-pipeline:2.7.0
value: termas.librecloud.online/termas_librecloud/webhook-pipeline:2.8.0
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: librecloud-webhook-pipeline-git
namespace: cdci-librecloud-services
namespace: cdci-librecloud-online
spec:
type: git
params:
- name: revision
value: master
- name: url
value: https://CREDENTIALS@repo.librecloud.services/termas_librecloud/webhook-pipeline.git
value: https://CREDENTIALS@rlung.librecloud.online/Termas_LibreCloud/webhook-pipeline.git

View file

@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1alpha1
kind: PipelineRun
metadata:
name: cdci-webhook-pipeline
namespace: cdci-librecloud-services
namespace: cdci-librecloud-online
spec:
serviceAccountName: build-bot
pipelineRef:

View file

@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1alpha1
kind: Pipeline
metadata:
name: cdci-webhook-pipeline
namespace: cdci-librecloud-services
namespace: cdci-librecloud-online
spec:
#serviceAccount: build-bot
resources:

View file

@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: webhook-pipeline-build-image-from-git-source
namespace: cdci-librecloud-services
namespace: cdci-librecloud-online
spec:
#serviceAccount: build-bot
inputs:
@ -25,7 +25,7 @@ spec:
type: string
description: The name of the BuildKit client (buildctl) image
default: "moby/buildkit:v0.6.2"
default: "docker.io/moby/buildkit:master-rootless"
- name: BUILDKIT_DAEMON_ADDRESS
type: string
description: The address of the BuildKit daemon (buildkitd) service
@ -45,6 +45,9 @@ spec:
- name: ssh-volume
secret:
secretName: ssh-key
- name: certs
secret:
secretName: buildkit-client-certs
steps:
- name: build-and-push
@ -55,6 +58,12 @@ spec:
command: [ "buildctl" ]
args:
- --tlscacert
- /certs/ca.pem
- --tlscert
- /certs/cert.pem
- --tlskey
- /certs/key.pem
- --debug
- --addr=$(inputs.params.BUILDKIT_DAEMON_ADDRESS)
- build
@ -72,4 +81,11 @@ spec:
- type=inline
- --import-cache
- type=registry,ref=$(outputs.resources.builtImage.url)
volumeMounts:
- name: certs
readOnly: true
mountPath: /certs
- name: ssh-volume
readOnly: true
mountPath: /.ssh

View file

@ -1,6 +1,6 @@
#/bin/bash
FOLLOW_UP="yes"
NS_DOMAIN="cdci-librecloud-services"
NS_DOMAIN="cdci-librecloud-online"
PIPELINE_NAME="cdci-webhook-pipeline"
[ "$1" == "-s" ] && FOLLOW_UP=""
is_running=`kubectl get pods -n $NS_DOMAIN | grep $PIPELINE_NAME 2>/dev/null`