- kind: pipeline
- type: docker
- name: build
-
- clone:
- disable: true
-
- steps:
- - name: clone
- image: docker:git
- environment:
- KEY:
- from_secret: DEPLOY_KEY
- PUBLIC:
- from_secret: DEPLOY_KEY_PUBLIC
- GIT_IP:
- from_secret: GIT_IP
- GIT_HOST:
- from_secret: GIT_HOST
- GIT_SSH_PORT:
- from_secret: GIT_SSH_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_SSH_PORT -H $GIT_IP >> $HOME/.ssh/known_hosts
- - ssh-keyscan -p $GIT_SSH_PORT -H $GIT_HOST >> $HOME/.ssh/known_hosts
- - git clone $GIT_REPOSITORY ./
- - git checkout $DRONE_COMMIT
-
- - name: build_php_base
- image: plugins/docker
- settings:
- dockerfile: docker/php/Dockerfile
- registry: localhost
- repo: arbitry_php_base
- dry_run: true
- insecure: true
- build_args:
- PHP_VERSION: 7.4.4
- commands:
- - ls -la
- depends_on:
- - clone
- trigger:
- status:
- - success
-
- - name: build_php_fpm
- image: plugins/docker
- settings:
- dockerfile: docker/php-fpm/Dockerfile
- registry: localhost
- repo: arbitry_php_fpm
- dry_run: true
- insecure: true
- build_args:
- BUILD_IMAGE: arbitry_php_base
- PHP_VERSION: 7.4.4
- depends_on:
- - build_php_base
- trigger:
- status:
- - success
|