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.
|
- kind: pipeline
- type: docker
- name: build
-
- clone:
- disable: true
-
- steps:
- - name: restore-cache-with-filesystem
- image: meltwater/drone-cache:dev
- pull: true
- settings:
- backend: "filesystem"
- restore: true
- cache_key: "volume"
- archive_format: "gzip"
- mount:
- - 'vendor'
- volumes:
- - name: cache
- path: /tmp/cache
-
- - name: clone
- image: docker:git
- environment:
- KEY:
- from_secret: DEPLOY_KEY
- PUBLIC:
- from_secret: DEPLOY_KEY_PUBLIC
- GIT_HOST:
- from_secret: GIT_HOST
- GIT_PORT:
- from_secret: GIT_PORT
- GIT_REPOSITORY:
- from_secret: GIT_REPOSITORY
- commands:
- - eval $(ssh-agent)
- - mkdir $HOME/.ssh && echo "$KEY" > $HOME/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa && echo "$PUBLIC" > $HOME/.ssh/id_rsa.pub
- - ssh-add $HOME/.ssh/id_rsa
- - ssh-keyscan -p $GIT_PORT -H $GIT_HOST > $HOME/.ssh/known_hosts
- - git clone $GIT_REPOSITORY ./
- - git checkout $DRONE_BRANCH
-
- - name: build_php_base
- image: plugins/docker
- settings:
- dockerfile: docker/php/Dockerfile
- registry: registry:5000
- repo: registry:5000/arbitry_php_base
- tags: ${DRONE_BRANCH//\\//-}
- insecure: true
- use_cache: true
- build_args:
- - PHP_VERSION=7.4.4
- depends_on:
- - clone
- trigger:
- status:
- - success
- volumes:
- - name: docker
- path: /var/lib/docker
-
- - name: build_php_fpm
- image: plugins/docker
- settings:
- dockerfile: docker/php-fpm/Dockerfile
- registry: registry:5000
- repo: registry:5000/arbitry_php_fpm
- tags: ${DRONE_BRANCH//\\//-}
- insecure: true
- build_args:
- - BUILD_IMAGE=registry:5000/arbitry_php_base:${DRONE_BRANCH//\\//-}
- - PHP_VERSION=7.4.4
- depends_on:
- - build_php_base
- trigger:
- status:
- - success
-
- - name: rebuild-cache-with-filesystem
- image: meltwater/drone-cache:dev
- pull: true
- settings:
- backend: "filesystem"
- rebuild: true
- cache_key: "volume"
- archive_format: "gzip"
- mount:
- - 'vendor'
- depends_on:
- - build_php_fpm
- volumes:
- - name: cache
- path: /tmp/cache
-
- volumes:
- - name: cache
- temp: {}
|