@3choBoomer no, if trigger
does not evaluate to true the pipeline does not execute. If you don't mind, how would you recommend rewriting this paragraph to make it more clear?
When you push code to your repository, open a pull request, or create a tag, your source control management system automatically sends a webhook to Drone which in turn triggers pipeline execution. Use the triggers section to limit pipeline execution.
unfortunately because I am so close to the project, I often don't realize when things are unclear. Having someone else summarize in their own words is often very helpful :)
{{ .Created }}
I get an integer. I know its probably the UNIX timestamp, but is there a way to get it in a human readable form?
drone build ls drone/hello-world --format="{{ time .Started }}"
$ drone build ls drone/hello-world --format="{{ .Number }},{{ time .Started }},{{ .Status }}"
123,2020-05-08 13:51:42 -0400 EDT,success
122,2020-05-08 12:25:19 -0400 EDT,success
121,2020-05-05 14:15:15 -0400 EDT,success
120,2020-05-04 09:13:49 -0400 EDT,success
119,2020-04-28 12:01:16 -0400 EDT,success
118,2020-04-28 12:00:35 -0400 EDT,success
hi, this is probably answered but i can't find a clear example/answer:
how can one filter by pull request merge ?
(basically i want to only trigger the build when a PR merge happens and ignore other PR actions)
kind: pipeline
name: default
steps:
- name: build and publish to ECR
image: plugins/ecr
settings:
repo: myrepo
registry: myrepo.dkr.ecr.eu-central-1.amazonaws.com
region: eu-central-1
tags:
- api-${DRONE_SOURCE_BRANCH}-${DRONE_BUILD_NUMBER}
- api-${DRONE_SOURCE_BRANCH}-latest
dockerfile: Dockerfile
when:
event:
- pull_request
branch:
- dev
push
events in Drone
I'm getting a "There was a problem enabling your repository. Validation Failed."
repository activation error ONLY when trying to build drone/drone from a Dockerfile. All I'm doing is adding some environment variables to the drone/drone image, e.g.
FROM drone/drone:1
ARG DRONE_GITHUB_CLIENT_ID
ENV DRONE_GITHUB_CLIENT_ID=$DRONE_GITHUB_CLIENT_ID
...
and running docker
with the same exact options. Any idea what could be the issue?
{"admin":true,"level":"debug","msg":"api: sync repository permissions","name":"noto-emoji-docker","namespace":"Drone","read":true,"request-id":"6e8d961579d61152440b5be83137e628","time":"2020-05-12T16:35:38Z","user.admin":true,"user.login":"admin","write":true}
{"admin":true,"level":"debug","msg":"api: repository permissions synchronized","name":"noto-emoji-docker","namespace":"Drone","read":true,"request-id":"6e8d961579d61152440b5be83137e628","time":"2020-05-12T16:35:39Z","user.admin":true,"user.login":"admin","write":true}
{"level":"debug","msg":"api: root access granted","name":"noto-emoji-docker","namespace":"Drone","request-id":"6e8d961579d61152440b5be83137e628","time":"2020-05-12T16:35:39Z","user.admin":true,"user.login":"admin"}
{"level":"debug","msg":"api: root access granted","name":"noto-emoji-docker","namespace":"Drone","request-id":"6e8d961579d61152440b5be83137e628","time":"2020-05-12T16:35:39Z","user.admin":true,"user.login":"admin"}
{"fields.time":"2020-05-12T16:35:39Z","latency":1002167554,"level":"debug","method":"POST","msg":"","remote":"10.42.0.0:59252","request":"/api/repos/Drone/noto-emoji-docker/builds","request-id":"6e8d961579d61152440b5be83137e628","time":"2020-05-12T16:35:39Z"}