+ ADD kubernete config connect
All checks were successful
/ build-and-deploy (push) Successful in 1m3s
All checks were successful
/ build-and-deploy (push) Successful in 1m3s
This commit is contained in:
@@ -10,7 +10,7 @@ jobs:
|
|||||||
id: short-sha
|
id: short-sha
|
||||||
with:
|
with:
|
||||||
length: 10
|
length: 10
|
||||||
- name: Set up kpack-cli
|
- name: Install kpack-cli
|
||||||
env:
|
env:
|
||||||
KPACK_CLI_VERSION: "0.13.0"
|
KPACK_CLI_VERSION: "0.13.0"
|
||||||
working-directory: /tmp
|
working-directory: /tmp
|
||||||
@@ -22,39 +22,14 @@ jobs:
|
|||||||
sudo mv kp-binaries/kp-linux-amd64-${KPACK_CLI_VERSION} /usr/local/bin/kp
|
sudo mv kp-binaries/kp-linux-amd64-${KPACK_CLI_VERSION} /usr/local/bin/kp
|
||||||
sudo chmod +x /usr/local/bin/kp
|
sudo chmod +x /usr/local/bin/kp
|
||||||
kp version
|
kp version
|
||||||
- name: Set up kubectl
|
- name: Install kubectl
|
||||||
uses: azure/setup-kubectl@v4
|
uses: azure/setup-kubectl@v4
|
||||||
- name: Configure (kubectl)
|
- name: Configure kubectl
|
||||||
env:
|
uses: azure/k8s-set-context@v1
|
||||||
KUBE_CA_DATA: ${{ secrets.KUBE_CA_DATA }}
|
with:
|
||||||
KUBE_USER_TOKEN: ${{ secrets.KUBE_USER_TOKEN }}
|
kubeconfig: ${{ secrets.KUBE_CONFIG }}
|
||||||
run: |
|
|
||||||
KUBECONFIG=$(mktemp)
|
|
||||||
tee "${KUBECONFIG}" <<EOF
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Config
|
|
||||||
clusters:
|
|
||||||
- cluster:
|
|
||||||
certificate-authority-data: ${KUBE_CA_DATA}
|
|
||||||
server: https://kubernetes.default.svc
|
|
||||||
name: local
|
|
||||||
contexts:
|
|
||||||
- context:
|
|
||||||
name: local
|
|
||||||
cluster: local
|
|
||||||
user: user
|
|
||||||
namespace: test-builder
|
|
||||||
current-context: local
|
|
||||||
users:
|
|
||||||
- name: local
|
|
||||||
user:
|
|
||||||
token: ${KUBE_USER_TOKEN}
|
|
||||||
EOF
|
|
||||||
echo "KUBECONFIG=${KUBECONFIG}" >> $GITHUB_ENV
|
|
||||||
- name: Check kubernetes connection
|
- name: Check kubernetes connection
|
||||||
run: |
|
run: |
|
||||||
echo "Kubernetes connection config (KUBECONFIG): ${KUBECONFIG}"
|
|
||||||
cat ${KUBECONFIG}
|
|
||||||
kubectl get pod
|
kubectl get pod
|
||||||
- name: Update kpack image
|
- name: Update kpack image
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user