forked from corporate-org/product-fe
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added .drone.yml file for Humanitec Platform.
- Loading branch information
1 parent
53c450f
commit 3c1c15c
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# .drone.yml - Sample file for connecting your module to Walhall's CI/CD pipeline. | ||
# Save this in the repository root. You don't have to change anything. | ||
# All environment variables are created in Walhall as secrets. | ||
|
||
pipeline: | ||
# Walhall requires git tags to exactly match the image tags. | ||
# This step preserves the tags. | ||
preserve-git-tags: | ||
image: bash | ||
commands: | ||
# If the commit reference is a tag, then Drone will write the tag to the .tags file | ||
- bash -c "[[ \"${DRONE_COMMIT_REF}\" == \"refs/tags/\"* ]] && echo \"${DRONE_COMMIT_REF#refs/tags/}\" > .tags" | ||
when: | ||
event: [tag] | ||
|
||
# This step builds the image and pushes it to the registry when a tag is pushed. | ||
# Drone is configured to use the Walhall registry by default. | ||
build-docker-image-tag: | ||
image: plugins/docker | ||
registry: | ||
from_secret: DOCKER_REGISTRY | ||
repo: | ||
from_secret: DOCKER_REPO | ||
username: | ||
from_secret: DOCKER_USERNAME | ||
password: | ||
from_secret: DOCKER_PASSWORD | ||
insecure: true | ||
file: Dockerfile | ||
when: | ||
event: [tag] | ||
status: [success] |