Possibly the same issue as here: [Insufficient Details] The drone template cannot deploy but the thread is locked ¯\(ツ)/¯
Upgraded from latest drone/drone:1 to latest drone/drone:2 today (image says Created": "2021-08-24T16:00:17.949108618Z
)
When I do following:
Create .drone.star
Switch settings to use .drone.star as config
push to github
→ pipelines are correctly generated, jobs are running, everything works fine
Then I do:
Create .drone.yml
Switch settings to use .drone.yml as config
Upload template as following
root@75793e416aba:/opt/molecule/dronelib# drone template add --namespace veselahouba --name linter --data @linter.star
root@75793e416aba:/opt/molecule/dronelib# drone template ls
linter [33mroot@75793e416aba:/opt/molecule/dronelib#
Something fishy about the template probably?
root@75793e416aba:/opt/molecule/dronelib# drone template info --name linter --namespace veselahouba
linter [33mtemplate: _:1:30: executing "_" at <.Namespace>: can't evaluate field Namespace in type *drone.Template
push to github
→ pipeline is not generated, task hangs in pending
Here’s my config:
linter.star
def main(ctx):
return {
"kind": "pipeline",
"name": "linter",
"steps": [
{
"name": "Lint",
"image": "veselahouba/molecule",
"commands": [
"shellcheck_wrapper",
"flake8",
"yamllint .",
"ansible-lint"
]
}
]
}
.drone.yml
---
kind: template
load: veselahouba.linter
data:
use_hetzner: true
my docker-compose.yml
version: '3'
services:
drone-autoscaler:
depends_on:
- drone-server
environment:
- DRONE_POOL_MIN=0
- DRONE_POOL_MIN_AGE=15m
- DRONE_POOL_MAX=4
- DRONE_SERVER_PROTO=https
- DRONE_SERVER_HOST=drone.m-cloud.cz
- DRONE_SERVER_TOKEN=<ommit>
- DRONE_AGENT_TOKEN=<ommit>
- DRONE_HETZNERCLOUD_TOKEN=<ommit>
- DRONE_HETZNERCLOUD_SSHKEY=<ommit>
- DRONE_HETZNERCLOUD_TYPE=cx21
- DRONE_HETZNERCLOUD_IMAGE=ubuntu-20.04
image: drone/autoscaler
ports:
- 8080:8080
restart: unless-stopped
volumes:
- /opt/docker/drone/autoscaler:/data
drone-runner:
depends_on:
- drone-server
environment:
- DRONE_RPC_PROTO=https
- DRONE_RPC_HOST=drone.m-cloud.cz
- DRONE_RPC_SECRET=<ommit>
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=drone01.m-cloud.cz
- DRONE_RPC_DUMP_HTTP=true
- DRONE_RPC_DUMP_HTTP_BODY=true
image: drone/drone-runner-docker:1
ports:
- 127.0.0.1:3000:3000
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
drone-server:
environment:
- DRONE_GITHUB_CLIENT_ID=<ommit>
- DRONE_GITHUB_CLIENT_SECRET=<ommit>
- DRONE_RPC_SECRET=<ommit>
- DRONE_SERVER_HOST=drone.m-cloud.cz
- DRONE_SERVER_PROTO=https
- DRONE_USER_FILTER=<ommit>
- DRONE_USER_CREATE=<ommit>
- DRONE_STARLARK_ENABLED=true
- DRONE_LOGS_TRACE=true
image: drone/drone:2
ports:
- 1080:80
restart: unless-stopped
volumes:
- /opt/docker/drone/data:/data
docker logs output
job info
root@75793e416aba:/opt/molecule/dronelib# drone build info VeselaHouba/ansible-role-crowdsec 22
Number: 22
Status: pending
Event: push
Commit: a28fd900af58d95b0a5398d0f580960d67561d4f
Branch: drone
Ref: refs/heads/drone
Author: VeselaHouba <michalek@m-cloud.cz>
Message: Drone templating