force SIGINT when terminating the agent

This commit is contained in:
Brad Rydzewski 2019-03-19 14:44:02 -07:00
parent 38b1847914
commit fabd2670f5
6 changed files with 22 additions and 0 deletions

View file

@ -11,4 +11,6 @@ ADD release/linux/amd64/drone-agent /bin/
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
LABEL com.centurylinklabs.watchtower.stop-signal="SIGINT"
ENTRYPOINT ["/bin/drone-agent"] ENTRYPOINT ["/bin/drone-agent"]

View file

@ -7,4 +7,6 @@ ENV DRONE_RUNNER_CAPACITY=1
ENV DRONE_RUNNER_VARIANT=v7 ENV DRONE_RUNNER_VARIANT=v7
ADD release/linux/arm/drone-agent /bin/ ADD release/linux/arm/drone-agent /bin/
LABEL com.centurylinklabs.watchtower.stop-signal="SIGINT"
ENTRYPOINT ["/bin/drone-agent"] ENTRYPOINT ["/bin/drone-agent"]

View file

@ -7,4 +7,6 @@ ENV DRONE_RUNNER_CAPACITY=1
ENV DRONE_RUNNER_VARIANT=v8 ENV DRONE_RUNNER_VARIANT=v8
ADD release/linux/arm64/drone-agent /bin/ ADD release/linux/arm64/drone-agent /bin/
LABEL com.centurylinklabs.watchtower.stop-signal="SIGINT"
ENTRYPOINT ["/bin/drone-agent"] ENTRYPOINT ["/bin/drone-agent"]

View file

@ -8,5 +8,7 @@ ENV DRONE_RUNNER_PLATFORM=windows/amd64
ENV DRONE_RUNNER_KERNEL=1803 ENV DRONE_RUNNER_KERNEL=1803
ENV DRONE_RUNNER_CAPACITY=1 ENV DRONE_RUNNER_CAPACITY=1
LABEL com.centurylinklabs.watchtower.stop-signal="SIGINT"
ADD release/windows/1803/amd64/drone-agent.exe C:/drone-agent.exe ADD release/windows/1803/amd64/drone-agent.exe C:/drone-agent.exe
ENTRYPOINT [ "C:\\drone-agent.exe" ] ENTRYPOINT [ "C:\\drone-agent.exe" ]

View file

@ -8,5 +8,7 @@ ENV DRONE_RUNNER_PLATFORM=windows/amd64
ENV DRONE_RUNNER_KERNEL=1809 ENV DRONE_RUNNER_KERNEL=1809
ENV DRONE_RUNNER_CAPACITY=1 ENV DRONE_RUNNER_CAPACITY=1
LABEL com.centurylinklabs.watchtower.stop-signal="SIGINT"
ADD release/windows/1809/amd64/drone-agent.exe C:/drone-agent.exe ADD release/windows/1809/amd64/drone-agent.exe C:/drone-agent.exe
ENTRYPOINT [ "C:\\drone-agent.exe" ] ENTRYPOINT [ "C:\\drone-agent.exe" ]

View file

@ -435,6 +435,18 @@ WHERE repo_id = :repo_id
AND repo_version = :repo_version_old AND repo_version = :repo_version_old
` `
// TODO(bradrydzewski) this query needs performance tuning.
// one approach that is promising is the ability to use the
// repo_counter (latest build number) to join on the build
// table.
//
// FROM repos LEFT OUTER JOIN builds ON (
// repos.repo_id = builds.build_repo_id AND
// builds.build_number = repos.repo_counter
// )
// INNER JOIN perms ON perms.perm_repo_uid = repos.repo_uid
//
const queryRepoWithBuild = queryColsBulds + ` const queryRepoWithBuild = queryColsBulds + `
FROM repos LEFT OUTER JOIN builds ON build_id = ( FROM repos LEFT OUTER JOIN builds ON build_id = (
SELECT build_id FROM builds SELECT build_id FROM builds