--- kind: pipeline type: docker name: default steps: - name: 1.submodules image: alpine/git commands: - git submodule update --init --recursive - name: 2.building image: golang:1.17 environment: GOOS: linux GOARCH: amd64 GO111MODULE: on CGO_ENABLED: 0 GOPROXY: https://proxy.golang.com.cn,direct commands: - cd assetcenter - go version - go env - go build - name: 3.dockerbuild(test) image: plugins/docker settings: username: infish2018 password: infish@2022 repo: registry.cn-chengdu.aliyuncs.com/infish/queentreetest registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '0.0.1' context: assetcenter/ dockerfile: assetcenter/Dockerfile when: branch: - test - name: 4.ssh-deploy(test) image: appleboy/drone-ssh settings: host: - 124.71.139.24 username: root password: from_secret: serverpassword port: 22 command_timeout: 3m script: - cd /root/services/compose-comm-test - docker pull registry.cn-chengdu.aliyuncs.com/infish/queentreetest:latest - docker-compose up -d - docker-compose ps when: branch: - test - name: 3.dockerbuild(release) image: plugins/docker settings: username: infish2018 password: infish@2022 repo: registry.cn-chengdu.aliyuncs.com/infish/queentree registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '0.0.1' context: assetcenter/ dockerfile: assetcenter/Dockerfile when: branch: - release - name: 4.ssh-deploy(release) image: appleboy/drone-ssh settings: host: - 124.71.139.24 username: root password: from_secret: serverpassword port: 22 command_timeout: 3m script: - cd /root/services/platform-release - docker pull registry.cn-chengdu.aliyuncs.com/infish/queentree:latest - docker-compose up -d - docker-compose ps when: branch: - release - name: 3.dockerbuild(dadongtest) image: plugins/docker settings: username: infish2018 password: infish@2022 repo: registry.cn-chengdu.aliyuncs.com/waibao/dadongtreetest registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '0.0.1' context: assetcenter/ dockerfile: assetcenter/Dockerfile when: branch: - dadongtest - name: 4.ssh-deploy(dadongtest) image: appleboy/drone-ssh settings: host: - 124.71.170.116 username: root password: from_secret: dadongpassword port: 22 command_timeout: 3m script: - cd /root/sku3d-test - docker pull registry.cn-chengdu.aliyuncs.com/waibao/dadongtreetest:latest - docker-compose up -d - docker-compose ps when: branch: - dadongtest - name: 3.dockerbuild(dadongrelease) image: plugins/docker settings: username: infish2018 password: infish@2022 repo: registry.cn-chengdu.aliyuncs.com/waibao/dadongtree registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '0.0.1' context: assetcenter/ dockerfile: assetcenter/Dockerfile when: branch: - dadongrelease - name: 4.ssh-deploy(dadongrelease) image: appleboy/drone-ssh settings: host: - 124.71.170.116 username: root password: from_secret: dadongpassword port: 22 command_timeout: 3m script: - cd /root/sku3d - docker pull registry.cn-chengdu.aliyuncs.com/waibao/dadongtree:latest - docker-compose up -d - docker-compose ps when: branch: - dadongrelease trigger: branch: - test - release - dadongrelease - dadongtest event: - push