github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/build/cloudbuild-ci.yaml (about) 1 # In this directory, run the following command to build this builder. 2 # $ gcloud builds submit --config ./build/cloudbuild-ci.yaml . 3 4 # Run locally 5 # $ cloud-build-local --config=build/cloudbuild-ci.yaml --dryrun=false ./ 6 7 #steps: 8 #- name: mattermost/mattermost-build-server:20201119_golang-1.15.5 9 # entrypoint: 'bash' 10 # args: 11 # - '-c' 12 # - | 13 # echo "Installing golangci-lint" \ 14 # curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/local/bin v1.33.2 \ 15 # echo "Install hkserver" \ 16 # export GOBIN=${PWD}/hkserver/bin \ 17 # export PATH=$PATH:$GOBIN \ 18 # make build \ 19 # && make package 20 # volumes: 21 # - name: 'hkserver' 22 # path: './' 23 #artifacts: 24 # objects: 25 # location: 'gs://hk_cloudbuildci/packages/' 26 # paths: ['./dist/hkserver-team-linux-amd64.tar.gz'] 27 28 steps: 29 - name: 'mattermost/mattermost-build-server:20201119_golang-1.15.5' 30 entrypoint: 'bash' 31 args: 32 - '-c' 33 - | 34 mkdir -p bin/; 35 ssh -4 -fNTM -o StrictHostKeyChecking=no -L 3306:127.0.0.1:3306 -L 10025:127.0.0.1:10025 -L 10080:127.0.0.1:10080 -L 10110:127.0.0.1:10110 -L 9000:127.0.0.1:9000 -L 5432:127.0.0.1:5432 -i ./build/kunai_id_rsa kunai@global.kunai.tv && \ 36 make test-server-ci; 37 ps aux | grep '[s]sh.*-f' | awk '{ print $2; }' | xargs -r kill -INT 38 #volumes: 39 # - name: 'hkserver' 40 # path: './' 41 42 options: 43 env: [ 44 'TEST_DATABASE_MYSQL_DSN=hkuser:mostest@tcp(127.0.0.1:3306)/hungknow_test?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s&multiStatements=true', 45 'TEST_DATABASE_POSTGRESQL_DSN=postgres://hkuser:mostest@127.0.0.1:5432/hungknow_test?sslmode=disable&connect_timeout=10', 46 'TEST_DATABASE_MYSQL_ROOT_PASSWD=mostest', 47 'MM_SQLSETTINGS_DATASOURCE=', 48 'MM_SQLSETTINGS_DRIVERNAME=', 49 'IS_CI=true' 50 ]