test simple pipeline on v3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -3,36 +3,9 @@ when:
|
||||
event: push
|
||||
|
||||
steps:
|
||||
- name: build-and-push
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
commands:
|
||||
- TAG=${CI_COMMIT_SHA:0:8}
|
||||
- REGISTRY=git.mikhailkilin.ru
|
||||
- REPO=killingdruid/bcard
|
||||
- echo "Building $REGISTRY/$REPO:$TAG"
|
||||
- AUTH=$(echo -n "$DOCKER_USERNAME:$DOCKER_PASSWORD" | base64)
|
||||
- mkdir -p /kaniko/.docker
|
||||
- 'printf "{\"auths\":{\"%s\":{\"auth\":\"%s\"}}}" "$REGISTRY" "$AUTH" > /kaniko/.docker/config.json'
|
||||
- /kaniko/executor --context=$CI_WORKSPACE --dockerfile=$CI_WORKSPACE/Dockerfile --destination=$REGISTRY/$REPO:$TAG --destination=$REGISTRY/$REPO:latest --insecure --skip-tls-verify --verbosity=info
|
||||
|
||||
- name: update-manifests
|
||||
- name: test
|
||||
image: alpine
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
commands:
|
||||
- apk add --no-cache git
|
||||
- 'TAG=${CI_COMMIT_SHA:0:8}'
|
||||
- 'sed -i "s|image:.*killingdruid/bcard:.*|image: git.mikhailkilin.ru/killingdruid/bcard:$TAG|" k8s/bcard.yaml'
|
||||
- 'git config user.email "ci@mikhailkilin.ru"'
|
||||
- 'git config user.name "Woodpecker CI"'
|
||||
- git add k8s/bcard.yaml
|
||||
- 'git diff --cached --quiet && echo No_changes || git commit -m "[skip ci] deploy bcard:$TAG"'
|
||||
- 'git push https://$DOCKER_USERNAME:$DOCKER_PASSWORD@git.mikhailkilin.ru/killingdruid/bcard.git HEAD:main'
|
||||
- echo 'Woodpecker v3 works'
|
||||
- pwd
|
||||
- ls -la
|
||||
|
||||
Reference in New Issue
Block a user