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
|
event: push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-push
|
- name: test
|
||||||
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
|
|
||||||
image: alpine
|
image: alpine
|
||||||
environment:
|
|
||||||
DOCKER_USERNAME:
|
|
||||||
from_secret: docker_username
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
from_secret: docker_password
|
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache git
|
- echo 'Woodpecker v3 works'
|
||||||
- 'TAG=${CI_COMMIT_SHA:0:8}'
|
- pwd
|
||||||
- 'sed -i "s|image:.*killingdruid/bcard:.*|image: git.mikhailkilin.ru/killingdruid/bcard:$TAG|" k8s/bcard.yaml'
|
- ls -la
|
||||||
- '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'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user