Devops : CI/CD #19

Closed
opened 2022-03-15 04:57:52 +00:00 by realaravinth · 10 comments
realaravinth commented 2022-03-15 04:57:52 +00:00 (Migrated from git.batsense.net)
There is no content yet.
realaravinth commented 2022-03-19 13:20:42 +00:00 (Migrated from git.batsense.net)

Woodpecker, at the moment, doesn't send emails on CI failures(see failure commit and corresponding CI logs.

There is a drone.io plugin that implements emails where the recepients are:

  • hardcoded:
pipeline:
  notify:
    image: drillster/drone-email
    host: smtp.some-server.com
+   skip_verify: true
    username: foo
    password: bar
    from: drone@your-domain.com
	recipients: [ the-admin@your-domain.com, octocat@your-domain.com ]
    when:
      status: [ changed, failure ]

If time permits, we should implement integration with the mailing infrastructure.

Woodpecker, at the moment, doesn't send emails on CI failures(see [failure commit](https://git.batsense.net/realaravinth/testing/commit/3198ce843fd7651287ac6ec3ea7b6b70f5b4e88c) and [corresponding CI logs](https://ci.batsense.net/realaravinth/testing/build/2). There is a [drone.io plugin](https://plugins.drone.io/drillster/drone-email/) that implements emails where the recepients are: - hardcoded: ```yml pipeline: notify: image: drillster/drone-email host: smtp.some-server.com + skip_verify: true username: foo password: bar from: drone@your-domain.com recipients: [ the-admin@your-domain.com, octocat@your-domain.com ] when: status: [ changed, failure ] ``` - supplied during runtime [using in-built templating and environment variables](https://woodpecker-ci.org/docs/usage/environment#string-operations) If time permits, we should implement integration with the mailing infrastructure.
dachary commented 2022-03-21 21:34:48 +00:00 (Migrated from git.batsense.net)

If time permits, we should implement integration with the mailing infrastructure.

I agree, it is quite important to get notifications when the CI fails.

> If time permits, we should implement integration with the mailing infrastructure. I agree, it is quite important to get notifications when the CI fails.
dachary commented 2022-03-21 21:35:49 +00:00 (Migrated from git.batsense.net)

I'll now need to learn about woodpecker, studying an existing ansible role.

I'll now need to learn about woodpecker, studying an existing [ansible role](https://codeberg.org/rhiz0et/ansible-role-woodpecker).
dachary commented 2022-03-21 22:27:34 +00:00 (Migrated from git.batsense.net)

I've also read the documentation and I'm curious to know more about your installation @realaravinth. I'll tailor the Ansible playbook according to your preferences, building on your experience to educate myself.

I've also read [the documentation](https://woodpecker-ci.org/docs/administration/server-config) and I'm curious to know more about your installation @realaravinth. I'll tailor the Ansible playbook according to your preferences, building on your experience to educate myself.
realaravinth commented 2022-03-22 03:20:35 +00:00 (Migrated from git.batsense.net)

The woodpecker agent requires basic setup.

Agent:

version: '3'

services:

  woodpecker-agent:
     image: woodpeckerci/woodpecker-agent:latest
     command: agent
     restart: always
     volumes:
       - /var/run/docker.sock:/var/run/docker.sock
     environment:
       - WOODPECKER_SERVER=192.168.0.102:9000
       - WOODPECKER_AGENT_SECRET=<REDACTED>

Server:

version: "3"

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:latest
    ports:
      - 28000:8000 # default server port, ref: https://woodpecker-ci.org/docs/administration/server-config#woodpecker_server_addr
      - 9000:9000 # default RPC port, ref https://woodpecker-ci.org/docs/administration/server-config#woodpecker_grpc_addr
    volumes:
      - woodpecker-server-data:/var/lib/woodpecker/
    restart: always
    environment:
      - WOODPECKER_OPEN=false
      - WOODPECKER_ADMIN=realaravinth,dachary
      - WOODPECKER_AGENT_SECRET=REDACTED
      - WOODPECKER_GITEA=true
      - WOODPECKER_HOST=https://ci.batsense.net
      - WOODPECKER_GITEA_URL=https://git.batsense.net
      - WOODPECKER_GITEA_CLIENT=REDACTED
      - WOODPECKER_GITEA_SECRET=REDACTED
      - WOODPECKER_DATABASE_DRIVER=postgres
      - WOODPECKER_DATABASE_DATASOURCE=postgres://REDACTED
The woodpecker agent requires basic setup. ## Agent: ```yaml version: '3' services: woodpecker-agent: image: woodpeckerci/woodpecker-agent:latest command: agent restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - WOODPECKER_SERVER=192.168.0.102:9000 - WOODPECKER_AGENT_SECRET=<REDACTED> ``` ## Server: ```yaml version: "3" services: woodpecker-server: image: woodpeckerci/woodpecker-server:latest ports: - 28000:8000 # default server port, ref: https://woodpecker-ci.org/docs/administration/server-config#woodpecker_server_addr - 9000:9000 # default RPC port, ref https://woodpecker-ci.org/docs/administration/server-config#woodpecker_grpc_addr volumes: - woodpecker-server-data:/var/lib/woodpecker/ restart: always environment: - WOODPECKER_OPEN=false - WOODPECKER_ADMIN=realaravinth,dachary - WOODPECKER_AGENT_SECRET=REDACTED - WOODPECKER_GITEA=true - WOODPECKER_HOST=https://ci.batsense.net - WOODPECKER_GITEA_URL=https://git.batsense.net - WOODPECKER_GITEA_CLIENT=REDACTED - WOODPECKER_GITEA_SECRET=REDACTED - WOODPECKER_DATABASE_DRIVER=postgres - WOODPECKER_DATABASE_DATASOURCE=postgres://REDACTED ```
dachary commented 2022-03-23 10:48:25 +00:00 (Migrated from git.batsense.net)
First [draft version of the woodpecker playbook](https://lab.enough.community/main/infrastructure/-/merge_requests/520/diffs)
dachary commented 2022-03-24 07:08:00 +00:00 (Migrated from git.batsense.net)

Merged support for woodpecker and published Enough 2.2.2 that includes it.

Merged [support for woodpecker](https://lab.enough.community/main/infrastructure/-/merge_requests/520/diffs) and published [Enough 2.2.2](https://pypi.org/project/enough/2.2.2) that includes it.
dachary commented 2022-03-24 13:25:09 +00:00 (Migrated from git.batsense.net)

Install gitea,woodpecker.hostea.org and fix a bug.

Install gitea,woodpecker.hostea.org and fix a bug.
dachary added spent time 2022-04-08 06:35:38 +00:00
12h

The coupling of Woodpecker and Gitea implemented in the gitea playbook has stabilized and proved reliable. The hosteasetup.py has a Woodpecker class to interact with a running instance via the API and help with deployment.

The coupling of Woodpecker and Gitea implemented [in the gitea playbook](https://lab.enough.community/main/infrastructure/-/tree/master/playbooks/gitea) has stabilized and proved reliable. The [hosteasetup.py](https://lab.enough.community/main/infrastructure/-/blob/master/playbooks/hostea/roles/hostea/files/hosteasetup.py) has a Woodpecker class to interact with a running instance via the API and help with deployment.
dachary self-assigned this 2022-05-16 12:15:06 +00:00

This is good enough for the MVP and proved to work well over the past four weeks, thank you dogfooding.

This is good enough for the MVP and proved to work well over the past four weeks, thank you dogfooding.
realaravinth added spent time 2022-05-16 13:24:22 +00:00
30min
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Total Time Spent: 12 hours 30 minutes
dachary
12 hours
realaravinth
30 minutes
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hostea/july-mvp#19
There is no content yet.