Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 20 2020 05:53
    @ashwilliams1 banned @matrixbot
  • Oct 18 2019 03:30
    @bradrydzewski banned @vityafx
  • May 07 2019 20:55
    @bradrydzewski banned @izznogooood
Carl Menezes
@carl-menezes-aql
I have noticed that if I used {{ .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?
Brad Rydzewski
@bradrydzewski
@carl-menezes-aql
drone build ls drone/hello-world --format="{{ time .Started }}"
Carl Menezes
@carl-menezes-aql
aha! thank you @bradrydzewski
image.png
@bradrydzewski : doesn't work (at least with version 1.2.1 on windows) -
Brad Rydzewski
@bradrydzewski
you might need to build from source, not sure
Carl Menezes
@carl-menezes-aql
ok will try that
Brad Rydzewski
@bradrydzewski
but it definitely works with with master
$ 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
Carl Menezes
@carl-menezes-aql
excellent :) Thank you.
Actually...no need to build from source. User error. I just noticed I needed a space between time and .Started
image.png
softshipper
@softshipper
balugcath
@balugcath
Hi, i,m trying drone cloud but cant authenticate with GitHub, i,m get: Login Failed. Cannot verify user authenticity. can anyone help me?
Nuno Ferreira
@numiralofe

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
Brad Rydzewski
@bradrydzewski
@numiralofe when you merge a pull request, github sends a push webhook
therefore, if you want to ignore pull requests except for when they are merged, you only need to handle push events in Drone
Adam Basfop Cavendish
@adamcavendish
Hi, when I do POST to /api/repos/{namespace}/{repo-name}/builds I always get {"message": "Not Found"}. Does anyone know why?
Adam Basfop Cavendish
@adamcavendish
When POST to /api/repos/{namespace}/{repo-name} it gives correct result
dekryptic
@dekryptic

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?

ashwilliams1
@ashwilliams1
@dekryptic I think I'm unclear, because the error message you posted is related to activating a repository in Drone, right? I am not clear on how this related to building a docker image.
@adamcavendish maybe you only have insufficient permission? maybe you have an outdated version of Drone that does not have this newer endpoint available?
Adam Basfop Cavendish
@adamcavendish

@adamcavendish maybe you only have insufficient permission? maybe you have an outdated version of Drone that does not have this newer endpoint available?

I'm running drone 1.7 and drone-docker-runner 1.3

ashwilliams1
@ashwilliams1
have you checked your server logs with debug logging enabled?
Adam Basfop Cavendish
@adamcavendish
Yeah ... I got it enabled but it barely say something. Just said that it got an API request
ashwilliams1
@ashwilliams1
the debug logs may reveal information that is useful to us
Adam Basfop Cavendish
@adamcavendish
{"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"}
ashwilliams1
@ashwilliams1
please post your full configuration and logs to pastebin. having additional details about your install (gogs, gitea, github, bitbucket, etc) is useful to us.
Adam Basfop Cavendish
@adamcavendish
It's integrated with gitea
ashwilliams1
@ashwilliams1
Gitea does not support the Build create endpoint
Adam Basfop Cavendish
@adamcavendish
Oh ... that's why ... was it documented somewhere?
ashwilliams1
@ashwilliams1
there is an issue somewhere
we just received a PR yesterday I believe, but it has not landed in mainline
dekryptic
@dekryptic

@ashwilliams1 I've dug a bit deeper and figured out it has to do with DRONE_SERVER_HOST in my Dockerfile vs. as an --env variable with docker run. For some reason when I use:

RUN echo "${DRONE_SERVER_HOST}"
ARG DRONE_SERVER_HOST
ENV DRONE_SERVER_HOST=$DRONE_SERVER_HOST
RUN echo "${DRONE_SERVER_HOST}"

The variable doesn't change from localhost but all others do.

Adam Basfop Cavendish
@adamcavendish
So it might support build create right in the recent future

@ashwilliams1 I've dug a bit deeper and figured out it has to do with DRONE_SERVER_HOST in my Dockerfile vs. as an --env variable with docker run. For some reason when I use:

RUN echo "${DRONE_SERVER_HOST}"
ARG DRONE_SERVER_HOST
ENV DRONE_SERVER_HOST=$DRONE_SERVER_HOST
RUN echo "${DRONE_SERVER_HOST}"

The variable doesn't change from localhost but all others do.

Emmm ... this is interesting too

Adam Basfop Cavendish
@adamcavendish

we just received a PR yesterday I believe, but it has not landed in mainline

Interestingly I cannot find any PR created yesterday on github...

Brad Rydzewski
@bradrydzewski
@adamcavendish drone/go-scm#61
it was merged into a third party dependency yesterday, but that dependency is not yet updated in Drone core
Adam Basfop Cavendish
@adamcavendish
Great ... hope that it can fix the gitea
dekryptic
@dekryptic
After looking further into it I've learned that ENV variables always override ARG variables of the same name. So writing ENV DRONE_SERVER_HOST=$DRONE_SERVER_HOST is equivalent to ENV DRONE_SERVER_HOST=localhost where $DRONE_SERVER_HOST is always taken from the ENV variable defined in the base image rather than the ARG variable irrespective of order. I can work around this by passing in a build argument of a different name and then overriding the environment variable with another ENV instruction like this:
ARG DRONE_SERVER_HOST_ARG
ENV DRONE_SERVER_HOST=$DRONE_SERVER_HOST_ARG
I was also wondering if there's a way to "unset" ENV variables to avoid having them override ARG variables of the same name, but it's currently not possible: moby/moby#3465.
kolaente
@kolaente
Hey there, it seems like my drone instance is not picking up gitea tag events
The pipeline is not executed and I got nothing in the drone logs (DRONE_DEBUG enabled) but I can see the webhook being correctly fired in gitea
I'm running latest Gitea, maybe that could be an issue
but I think that would mean the webhook does not fire or something like that
Tom Vasile
@TomVasile
Hey all! From time to time I find some of the crons we configured in drone (& we use autoscaler) to be stuck in a state as it transitions to another pipeline. Has anyone come across this behavior? The crons work fine 99% of the time, just randomly I'll find 1 sitting in this stuck phase transitioning between pipeline 1 and pipeline 2.
the builds are listed as running in the database
but the autoscaler lists them as pending