Compare commits
1 Commits
66a7b9e7e6
...
aa2550cc59
| Author | SHA1 | Date | |
|---|---|---|---|
| aa2550cc59 |
@@ -19,6 +19,14 @@ jobs:
|
|||||||
git config --global http.https://git.kimchi.sslVerify false
|
git config --global http.https://git.kimchi.sslVerify false
|
||||||
git clone --depth 1 https://${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}@git.kimchi/tas/major_tom.git .
|
git clone --depth 1 https://${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}@git.kimchi/tas/major_tom.git .
|
||||||
|
|
||||||
|
- name: Debug registry auth
|
||||||
|
run: |
|
||||||
|
curl -s -D- http://git.kimchi/v2/ | head -15
|
||||||
|
TOKEN=$(curl -s "http://git.kimchi/v2/token?service=container_registry&scope=repository:tas/major_tom:push,pull" -u "${{
|
||||||
|
secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}" | jq -r .token)
|
||||||
|
echo "Token received: ${TOKEN:0:20}..."
|
||||||
|
curl -s -D- -H "Authorization: Bearer $TOKEN" http://git.kimchi/v2/tas/major_tom/tags/list | head -15
|
||||||
|
|
||||||
- name: Build and push container image
|
- name: Build and push container image
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
@@ -41,10 +49,9 @@ jobs:
|
|||||||
- name: Restart deployment on k3s
|
- name: Restart deployment on k3s
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.kube
|
mkdir -p ~/.kube
|
||||||
echo "${{ secrets.KUBECONFIG }}" | base64 -d > ~/.kube/config
|
echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config
|
||||||
chmod 600 ~/.kube/config
|
chmod 600 ~/.kube/config
|
||||||
kubectl delete pod -l app=${{ env.DEPLOYMENT }} -n ${{ env.NAMESPACE }}
|
|
||||||
|
|
||||||
POD_NAME=$(kubectl get pods -l app=jnr-web -n jnr-web -o jsonpath='{.items[0].metadata.name}')
|
POD_NAME=$(kubectl get pods -l app=jnr-web -n jnr-web -o jsonpath='{.items[0].metadata.name}')
|
||||||
echo "Deleting running pod" "$POD_NAME"
|
echo "Deleting running pod" "$POD_NAME"
|
||||||
|
kubectl delete pod $POD_NAME -n jnr-web
|
||||||
Reference in New Issue
Block a user