You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.3 KiB
51 lines
1.3 KiB
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
volumes:
|
|
- name: dockersock
|
|
host:
|
|
path: /var/run/docker.sock
|
|
|
|
steps:
|
|
- name: lint yaml
|
|
image: registry.fedy95.com/baseimage-yamllint:latest
|
|
commands:
|
|
- yamllint -c /yamllint/relaxed.yaml .
|
|
when:
|
|
event: pull_request
|
|
- name: lint json
|
|
image: registry.fedy95.com/baseimage-jsonlint:latest
|
|
commands:
|
|
- find . -name "*.json" | xargs -n 1 jsonlint -qc
|
|
when:
|
|
event: pull_request
|
|
|
|
- name: release
|
|
image: docker:dind
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run/docker.sock
|
|
settings:
|
|
repo: baseimage/jsonlint
|
|
tags:
|
|
- ${DRONE_TAG}
|
|
environment:
|
|
REGISTRY: registry.fedy95.com
|
|
REGISTRY_USERNAME:
|
|
from_secret: REGISTRY_USERNAME
|
|
REGISTRY_PASSWORD:
|
|
from_secret: REGISTRY_PASSWORD
|
|
commands:
|
|
- docker build -t "$REGISTRY"/baseimage-jsonlint:"$DRONE_TAG" image -f image/Dockerfile
|
|
- docker build -t "$REGISTRY"/baseimage-jsonlint:latest image -f image/Dockerfile
|
|
- docker login "$REGISTRY" -u"$REGISTRY_USERNAME" -p"$REGISTRY_PASSWORD"
|
|
- docker push "$REGISTRY"/baseimage-jsonlint:"$DRONE_TAG"
|
|
- docker push "$REGISTRY"/baseimage-jsonlint:latest
|
|
- docker logout "$REGISTRY"
|
|
when:
|
|
event: tag
|
|
|
|
...
|