diff --git a/.drone.yml b/.drone.yml index b40f5da..8eab141 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,16 +3,13 @@ kind: pipeline type: docker name: default -environment: - DOCKER_REPO: &docker_repo glenux/service-dolibarr - steps: - name: debug image: alpine environment: commands: - - 'echo "Repository: $${DOCKER_REPO}"' + - 'echo "Repository: glenux/service-dolibarr"' - 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"' - name: publish:commit_sha @@ -28,8 +25,8 @@ steps: from_secret: DOCKERHUB_USERNAME password: from_secret: DOCKERHUB_PASSWORD - cache_from: "$${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}" - repo: *docker_repo + cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}" + repo: glenux/service-dolibarr tags: "${DRONE_COMMIT_SHA:0:8}" purge: false @@ -43,8 +40,8 @@ steps: from_secret: DOCKERHUB_USERNAME password: from_secret: DOCKERHUB_PASSWORD - cache_from: "$${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}" - repo: *docker_repo + cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}" + repo: glenux/service-dolibarr tags: "latest_${DRONE_BRANCH/\\//-}" purge: false when: @@ -53,13 +50,15 @@ steps: - "develop" - "feature/*" - - name: docker + - name: publish:latest image: plugins/docker settings: - username: "${DOCKERHUB_USERNAME}" - password: "${DOCKERHUB_PASSWORD}" - cache_from: "$${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}" - repo: *docker_repo + username: + from_secret: DOCKERHUB_USERNAME + password: + from_secret: DOCKERHUB_PASSWORD + cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}" + repo: glenux/service-dolibarr tags: latest purge: false when: