1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- clone:
- disable: true
- kind: pipeline
- name: gin-proc
- steps:
- - image: drillster/drone-volume-cache
- name: restore-cache
- settings:
- mount: /drone/src
- restore: true
- volumes:
- - name: cache
- path: /cache
- - commands:
- - eval $(ssh-agent -s)
- - mkdir -p /root/.ssh
- - echo "$SSH_KEY" > /root/.ssh/id_rsa
- - chmod 0600 /root/.ssh/id_rsa
- - mkdir -p /etc/ssh
- - echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- - ssh-add /root/.ssh/id_rsa
- - git config --global user.name "gin-proc"
- - git config --global user.email "gin-proc@local"
- - ssh-keyscan -t rsa "$DRONE_GOGS_SERVER" > /root/.ssh/authorized_keys
- - if [ -d "$DRONE_REPO_NAME" ]; then cd "$DRONE_REPO_NAME"/; git fetch --all; git checkout -f "$DRONE_COMMIT"; else git clone "$DRONE_GIT_SSH_URL"; cd "$DRONE_REPO_NAME"/; fi
- - echo "Hello"
- environment:
- SSH_KEY:
- from_secret: DRONE_PRIVATE_SSH_KEY
- image: falconshock/gin-proc:micro-test
- name: execute
- volumes:
- - name: repo
- path: /repo
- - image: drillster/drone-volume-cache
- name: rebuild-cache
- settings:
- mount: /drone/src
- rebuild: true
- volumes:
- - name: cache
- path: /cache
- trigger:
- branch:
- - master
- event:
- - push
- status:
- - success
- volumes:
- - host:
- path: /gin-proc/cache
- name: cache
|