when: - event: push branch: main - event: manual branch: main labels: hostname: build-parspack steps: build: image: docker.arvancloud.ir/docker:24-cli volumes: - /var/run/docker.sock:/var/run/docker.sock - /home/opsadmin/.docker:/root/.docker:ro commands: - export YARA_IMAGE="registry.ittalie.com/yara724-maintenance-api:$CI_COMMIT_SHA" - docker build -t "$YARA_IMAGE" . - docker push "$YARA_IMAGE" notify-failure: image: docker.arvancloud.ir/alpine:3.20 environment: ROCKETCHAT_WEBHOOK: from_secret: rocketchat_webhook when: - status: failure commands: - apk add --no-cache curl jq > /dev/null - | jq -n --arg text "Yara724 api build failed. $CI_PIPELINE_URL" '{text: $text}' | curl -fsS -H 'Content-Type: application/json' --data-binary @- "$ROCKETCHAT_WEBHOOK"