Compare commits
No commits in common. "develop" and "master" have entirely different histories.
3 changed files with 45 additions and 11 deletions
50
.drone.yml
50
.drone.yml
|
@ -6,12 +6,18 @@ name: default
|
||||||
steps:
|
steps:
|
||||||
- name: debug
|
- name: debug
|
||||||
image: alpine
|
image: alpine
|
||||||
|
environment:
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- 'echo "Repository: glenux/service-drone-server"'
|
- 'echo "Repository: glenux/service-drone-server"'
|
||||||
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'
|
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'
|
||||||
|
|
||||||
- name: publish:commit_sha
|
- name: publish:commit_sha
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
|
# pull: never
|
||||||
|
# volumes:
|
||||||
|
# - name: cache
|
||||||
|
# path: /stupid
|
||||||
environment:
|
environment:
|
||||||
DOCKER_REPO: glenux/service-drone-server
|
DOCKER_REPO: glenux/service-drone-server
|
||||||
settings:
|
settings:
|
||||||
|
@ -19,14 +25,46 @@ steps:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKERHUB_PASSWORD
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
cache_from: "glenux/service-drone-server:${DRONE_BRANCH/\\//-}_latest"
|
cache_from: "glenux/service-drone-server:latest_${DRONE_BRANCH/\\//-}"
|
||||||
repo: glenux/service-drone-server
|
repo: glenux/service-drone-server
|
||||||
tags:
|
tags: "${DRONE_COMMIT_SHA:0:8}"
|
||||||
- "${DRONE_BRANCH/\\//-}_${DRONE_COMMIT_SHA:0:8}"
|
|
||||||
- "${DRONE_BRANCH/\\//-}_latest"
|
|
||||||
- "latest"
|
|
||||||
purge: false
|
purge: false
|
||||||
|
|
||||||
|
- name: publish:commit_branch
|
||||||
|
image: plugins/docker
|
||||||
|
# volumes:
|
||||||
|
# - name: cache
|
||||||
|
# path: /stupid
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: DOCKERHUB_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
|
cache_from: "glenux/service-drone-server:latest_${DRONE_BRANCH/\\//-}"
|
||||||
|
repo: glenux/service-drone-server
|
||||||
|
tags: "latest_${DRONE_BRANCH/\\//-}"
|
||||||
|
purge: false
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- "master"
|
||||||
|
- "develop"
|
||||||
|
- "feature/*"
|
||||||
|
|
||||||
|
- name: publish:latest
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: DOCKERHUB_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
|
cache_from: "glenux/service-drone-server:latest_${DRONE_BRANCH/\\//-}"
|
||||||
|
repo: glenux/service-drone-server
|
||||||
|
tags: latest
|
||||||
|
purge: false
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
# - name: deploy:dokku
|
# - name: deploy:dokku
|
||||||
# image: alpine
|
# image: alpine
|
||||||
# when:
|
# when:
|
||||||
|
@ -50,7 +88,7 @@ steps:
|
||||||
# - ssh -o StrictHostKeyChecking=no
|
# - ssh -o StrictHostKeyChecking=no
|
||||||
# -i ~/.ssh/deploy_key
|
# -i ~/.ssh/deploy_key
|
||||||
# "$SSH_USER@$SSH_HOST"
|
# "$SSH_USER@$SSH_HOST"
|
||||||
# git:from-image cicd
|
# git:from-image automation
|
||||||
# "glenux/service-drone-server:${DRONE_COMMIT_SHA:0:8}"
|
# "glenux/service-drone-server:${DRONE_COMMIT_SHA:0:8}"
|
||||||
# #
|
# #
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
FROM drone/drone:2.22.0
|
||||||
# FROM drone/drone:2.20.0
|
# FROM drone/drone:2.20.0
|
||||||
# FROM drone/drone:2.22.0
|
|
||||||
FROM drone/drone:2.24.0
|
|
||||||
|
|
||||||
COPY entrypoint-wrapper.sh /usr/bin/entrypoint-wrapper
|
COPY entrypoint-wrapper.sh /usr/bin/entrypoint-wrapper
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/entrypoint-wrapper"]
|
ENTRYPOINT ["/usr/bin/entrypoint-wrapper"]
|
||||||
|
|
||||||
|
|
|
@ -43,5 +43,3 @@ Deploy
|
||||||
git remote add dokku dokku@dokku.example.com:cicd
|
git remote add dokku dokku@dokku.example.com:cicd
|
||||||
git push dokku master
|
git push dokku master
|
||||||
|
|
||||||
dokku git:from-image cicd "glenux/service-drone-server:$IMAGE_TAG"
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue