28 lines
654 B
YAML
28 lines
654 B
YAML
when:
|
|
event: push
|
|
branch: main
|
|
|
|
steps:
|
|
- name: build
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
registry: harbor.scottyah.com
|
|
repo: harbor.scottyah.com/scottyah/blog
|
|
tags: latest
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
platforms: linux/amd64
|
|
insecure: true
|
|
username:
|
|
from_secret: harbor_username
|
|
password:
|
|
from_secret: harbor_password
|
|
|
|
- name: deploy
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- kubectl apply -f k8s.yaml -n blog
|
|
- kubectl rollout status deployment/blog-dep -n blog
|
|
environment:
|
|
KUBECONFIG:
|
|
from_secret: kubeconfig |