docker-getgrav/.drone.yml

317 lines
5.9 KiB
YAML

---
###############################################################################
kind: pipeline
type: docker
name: lint
steps:
- name: Lint Dockerfiles
image: hadolint/hadolint
commands:
- hadolint */Dockerfile*
when:
status:
- failure
- success
- name: Lint entrypoint scripts
image: koalaman/shellcheck-alpine
commands:
- shellcheck entrypoint*.sh
when:
status:
- failure
- success
trigger:
event:
- pull_request
- push
---
###############################################################################
kind: pipeline
type: docker
name: test_1.6
steps:
- name: build test
image: plugins/docker
settings:
dockerfile: 1.6/Dockerfile
repo: mwalbeck/getgrav
dry_run: true
trigger:
event:
- pull_request
depends_on:
- lint
---
###############################################################################
kind: pipeline
type: docker
name: build_and_release_1.6
steps:
- name: determine tags
image: mwalbeck/determine-docker-tags
environment:
VERSION_TYPE: "docker_env"
APP_NAME: "GRAV"
DOCKERFILE_PATH: "1.6/Dockerfile"
APP_ENV: ""
CUSTOM_TAGS: ""
INCLUDE_MAJOR: "no"
- name: build and publish
image: plugins/docker
settings:
dockerfile: 1.6/Dockerfile
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
repo: mwalbeck/getgrav
- name: notify
image: plugins/matrix
settings:
homeserver: https://matrix.mwalbeck.org
roomid:
from_secret: matrix_roomid
username:
from_secret: matrix_username
password:
from_secret: matrix_password
when:
status:
- success
- failure
trigger:
branch:
- master
event:
- push
depends_on:
- lint
---
###############################################################################
kind: pipeline
type: docker
name: test_1.6-prod
steps:
- name: build test
image: plugins/docker
settings:
dockerfile: 1.6/Dockerfile.prod
repo: mwalbeck/getgrav
dry_run: true
trigger:
event:
- pull_request
depends_on:
- lint
---
###############################################################################
kind: pipeline
type: docker
name: build_and_release_1.6-prod
steps:
- name: determine tags
image: mwalbeck/determine-docker-tags
environment:
VERSION_TYPE: "docker_env"
APP_NAME: "GRAV"
DOCKERFILE_PATH: "1.6/Dockerfile.prod"
APP_ENV: "prod"
CUSTOM_TAGS: ""
INCLUDE_MAJOR: "no"
- name: build and publish
image: plugins/docker
settings:
dockerfile: 1.6/Dockerfile.prod
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
repo: mwalbeck/getgrav
- name: notify
image: plugins/matrix
settings:
homeserver: https://matrix.mwalbeck.org
roomid:
from_secret: matrix_roomid
username:
from_secret: matrix_username
password:
from_secret: matrix_password
when:
status:
- success
- failure
trigger:
branch:
- master
event:
- push
depends_on:
- lint
---
###############################################################################
kind: pipeline
type: docker
name: test_1.7
steps:
- name: build test
image: plugins/docker
settings:
dockerfile: 1.7/Dockerfile
repo: mwalbeck/getgrav
dry_run: true
trigger:
event:
- pull_request
depends_on:
- lint
---
###############################################################################
kind: pipeline
type: docker
name: build_and_release_1.7
steps:
- name: determine tags
image: mwalbeck/determine-docker-tags
environment:
VERSION_TYPE: "docker_env"
APP_NAME: "GRAV"
DOCKERFILE_PATH: "1.7/Dockerfile"
APP_ENV: ""
CUSTOM_TAGS: "latest"
INCLUDE_MAJOR: "no"
- name: build and publish
image: plugins/docker
settings:
dockerfile: 1.7/Dockerfile
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
repo: mwalbeck/getgrav
- name: notify
image: plugins/matrix
settings:
homeserver: https://matrix.mwalbeck.org
roomid:
from_secret: matrix_roomid
username:
from_secret: matrix_username
password:
from_secret: matrix_password
when:
status:
- success
- failure
trigger:
branch:
- master
event:
- push
depends_on:
- lint
---
###############################################################################
kind: pipeline
type: docker
name: test_1.7-prod
steps:
- name: build test
image: plugins/docker
settings:
dockerfile: 1.7/Dockerfile.prod
repo: mwalbeck/getgrav
dry_run: true
trigger:
event:
- pull_request
depends_on:
- lint
---
###############################################################################
kind: pipeline
type: docker
name: build_and_release_1.7-prod
steps:
- name: determine tags
image: mwalbeck/determine-docker-tags
environment:
VERSION_TYPE: "docker_env"
APP_NAME: "GRAV"
DOCKERFILE_PATH: "1.7/Dockerfile.prod"
APP_ENV: "prod"
CUSTOM_TAGS: "latest-prod"
INCLUDE_MAJOR: "no"
- name: build and publish
image: plugins/docker
settings:
dockerfile: 1.7/Dockerfile.prod
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
repo: mwalbeck/getgrav
- name: notify
image: plugins/matrix
settings:
homeserver: https://matrix.mwalbeck.org
roomid:
from_secret: matrix_roomid
username:
from_secret: matrix_username
password:
from_secret: matrix_password
when:
status:
- success
- failure
trigger:
branch:
- master
event:
- push
depends_on:
- lint