40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
when:
|
|
event: push
|
|
branch: main
|
|
|
|
steps:
|
|
- name: echo
|
|
image: alpine/git
|
|
commands:
|
|
- echo "Done"
|
|
|
|
- name: build
|
|
image: gcr.io/kaniko-project/executor:debug
|
|
commands:
|
|
- /kaniko/executor --context=dir:///woodpecker/src --dockerfile=Dockerfile --destination=scottyah/blog:latest --cache=true
|
|
environment:
|
|
DOCKER_CONFIG: /kaniko/.docker
|
|
|
|
# - name: build
|
|
# image: docker:dind
|
|
# commands:
|
|
# - sleep 5 # Wait for Docker daemon to start
|
|
# - docker build -t scottyah/blog:latest .
|
|
# - docker push scottyah/blog:latest
|
|
# environment:
|
|
# DOCKER_HOST: tcp://127.0.0.1:2375
|
|
# privileged: true
|
|
|
|
# - name: build
|
|
# image: docker
|
|
# commands:
|
|
# - docker build -t scottyah/blog:latest .
|
|
# - docker push scottyah/blog:latest
|
|
# volumes:
|
|
# - /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
- name: deploy
|
|
image: kubernetes/client:latest
|
|
commands:
|
|
- kubectl apply -f k8s.yaml
|
|
- kubectl rollout status deployment/blog-dep |