只需一步,快速开始
编译自: https://seandrumm.co.uk/blog/building-go-projects-with-docker-on-gitlab-ci/ 作者: Sean Drumm 译者: geekpi
git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/myuser/mydependentrepo
before_script: - echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc
GOFILES = $(shell find . -name '*.go' -not -path './vendor/*') GOPACKAGES = $(shell go list ./... | grep -v /vendor/) default: build workdir: mkdir -p workdir build: workdir/scraper workdir/scraper: $(GOFILES) GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o workdir/scraper . test: test-all test-all: @go test -v $(GOPACKAGES) lint: lint-all lint-all: @golint -set_exit_status $(GOPACKAGES)
image: sjdweb/go-docker-build:1.10 stages: - test - build before_script: - cd $GOPATH/src - mkdir -p gitlab.com/$CI_PROJECT_NAMESPACE - cd gitlab.com/$CI_PROJECT_NAMESPACE - ln -s $CI_PROJECT_DIR - cd $CI_PROJECT_NAME - echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc - dep ensure -vendor-only lint_code: stage: test script: - make lint unit_tests: stage: test script: - make test build: stage: build script: - make
1624次查看 0评论
1608次查看 0评论
1369次查看 0评论
1308次查看 0评论
1248次查看 0评论
仪陇县康东海罗妍婚礼纪实
南充市嘉陵区大观乡蒲马院村
仪陇县2014年食品安全事故(Ⅳ级)应急处置演练
南充市顺庆区民政局门口排起长龙,520我们结婚吧!宋阳平分享 ...
嘉陵区文峰二小周清《匆匆》说课、磨课、评课视频
阆中民歌——山水风情
2023.10.3营山明制婚礼
阆中古城光雾山秋游
Archiver小黑屋联系我们免责声明 南充同城网 蜀ICP备18038374号
服务热线:19982827679 服务时间:9:00-21:00 广告合作客服QQ:496408460
© 2018-2019 IS0817.Powered by 南充同城网! X3.5