Devops : CI/CD #19

Open
opened 2022-03-15 10:27:52 +05:30 by realaravinth · 8 comments
Owner
No description provided.
realaravinth added this to the MVP milestone 2022-03-15 10:27:52 +05:30
realaravinth added the
backend
priority-1
labels 2022-03-15 10:27:52 +05:30
dachary was assigned by realaravinth 2022-03-15 10:27:52 +05:30
realaravinth added this to the July MVP project 2022-03-15 10:27:53 +05:30
realaravinth added spent time 2022-03-19 18:50:41 +05:30
30min
Author
Owner

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.
Owner

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.
Owner

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).
Owner

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.
dachary added spent time 2022-03-22 03:57:42 +05:30
1h
Author
Owner

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 ```
Owner
First [draft version of the woodpecker playbook](https://lab.enough.community/main/infrastructure/-/merge_requests/520/diffs)
dachary added spent time 2022-03-23 16:18:38 +05:30
1h
Owner

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 added spent time 2022-03-24 12:38:11 +05:30
8h
Owner

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

Install gitea,woodpecker.hostea.org and fix a bug.
dachary added spent time 2022-03-24 18:55:19 +05:30
2h
This repo is archived. You cannot comment on issues.
No description provided.