From 90705786f965fbb266320681e54eff1710c6d148 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Mon, 13 May 2024 21:37:10 +0530 Subject: [PATCH] feat: enable CI --- .woodpecker.yml | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..c055117 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,75 @@ +steps: + test: + image: rust + when: + event: [push, pull_request, tag, deployment] + environment: + - DATABASE_URL=postgres://postgres:password@database:5432/postgres + commands: + # - curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\ + # - apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget + - rustup toolchain install nightly + - rustup override set nightly + - rustup component add rustfmt + - rustup component add clippy + - export VANIGAM_server_COOKIE_SECRET=d05604b56ffd0f57200be49313a9e51436ca8f1678b9ffdf8d2602d5e9839f05 + - make db.migrate + - make lint + - make test + + build_binary: + image: rust + when: + event: [push, pull_request, tag, deployment] + commands: + - rustup override set stable + - make release + + build_docker_img: + image: plugins/docker + when: + event: [pull_request] + settings: + dry_run: true + repo: libresolutions/vanigam + tags: latest + + # build_and_publish_docker_img: + # image: plugins/docker + # when: + # event: [push, tag, deployment] + # settings: + # username: forgeflux + # password: + # from_secret: DOCKER_TOKEN + # repo: libresolutions/vanigam + # tags: + # latest + + # build_publisher_docker_img: + # image: plugins/docker + # when: + # event: [push, tag, deployment] + # settings: + # dry_run: true + # dockerfile: scripts/publish-bins-docker + # purge: false + # repo: libresolutions/vanigam-publisher + # tags: latest + # + # publish_bins: + # image: rust + # when: + # event: [push, tag, deployment] + # commands: + # - apt update + # - apt-get -y --no-install-recommends install gpg tar curl wget + # - echo -n "$RELEASE_BOT_GPG_SIGNING_KEY" | gpg --batch --import --pinentry-mode loopback + # - scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD + # secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD] + # +services: + database: + image: postgres + environment: + - POSTGRES_PASSWORD=password