From a71d1644e857bda59fd8792b038cb448614ada0d Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Sun, 21 Jul 2024 21:35:00 -0600 Subject: [PATCH] Switch to buildservice Use the Toolforge build service to build a custom container that we then run using the jobs service. Bug: T370565 --- toolforge/build.sh | 8 ++++++-- toolforge/jobs.yaml | 15 +++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/toolforge/build.sh b/toolforge/build.sh index d8c9894..0d791ed 100755 --- a/toolforge/build.sh +++ b/toolforge/build.sh @@ -1,2 +1,6 @@ -#!/bin/bash -toolforge jobs run build --command "bash -c 'source ~/.profile && cd ~/ircservserv && cargo build --release'" --image python3.11 --mem 2G --cpu 3 --wait 3600 --filelog-stdout logs/build-out.log --filelog-stderr logs/build-err.log +#!/usr/bin/env bash +set -Eeuo pipefail +REF=${1:-main} +REPO=https://gitlab.wikimedia.org/toolforge-repos/ircservserv + +exec toolforge build start --ref $REF $REPO diff --git a/toolforge/jobs.yaml b/toolforge/jobs.yaml index 3ec1ebb..d7be8a1 100644 --- a/toolforge/jobs.yaml +++ b/toolforge/jobs.yaml @@ -1,12 +1,7 @@ -- command: logrotate -v $TOOL_DATA_DIR/logrotate.conf --state $TOOL_DATA_DIR/.logrotate.state - emails: onfailure - filelog-stderr: logs/logrotate-err.log - filelog-stdout: logs/logrotate-out.log - image: mariadb - name: logrotate - schedule: '@daily' -- command: ./ircservserv/target/release/ircservserv +--- +- name: ircservserv + command: ./ircservserv.sh + image: tool-ircservserv/tool-ircservserv:latest continuous: true emails: onfailure - image: bookworm - name: ircservserv + mount: all