Verified Commit 8a8420fc authored by Sumner Evans's avatar Sumner Evans 💬
Browse files

CI: convert to GitLab

parent 8a49a248
Pipeline #400656210 passed with stage
in 1 minute and 39 seconds
image: nixos/unstable
environment:
REPO_NAME: standupbot
triggers:
- action: email
condition: failure
to: alerts@sumnerevans.com
artifacts:
- standupbot/standupbot
tasks:
- setup: |
cd $REPO_NAME
echo "cd $REPO_NAME" >> ~/.buildenv
nix-shell \
--arg forCI true \
--run "echo SHELL BUILD COMPLETE"
- build: |
nix-shell \
--arg forCI true \
--run "go build -v"
- test: |
nix-shell \
--arg forCI true \
--run "go test -v"
stages:
- build
build:
image: dock.mau.dev/tulir/gomuks-build-docker:linux-amd64
stage: build
cache:
paths:
- .cache
before_script:
- apk add --no-cache git ca-certificates build-base su-exec olm-dev
- mkdir -p .cache
- export GOPATH="$CI_PROJECT_DIR/.cache"
- export GOCACHE="$CI_PROJECT_DIR/.cache/build"
- export GO_LDFLAGS="-s -w -linkmode external -extldflags -static -X main.Tag=$CI_COMMIT_TAG -X main.Commit=$CI_COMMIT_SHA -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`'"
script:
- go build -ldflags "$GO_LDFLAGS" -o standupbot
artifacts:
paths:
- standupbot
- config.sample.json
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment