--- 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 sku3d - 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/sku3d/maintest registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '1.0.13' context: sku3d/ dockerfile: sku3d/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-sku3d-test - docker pull registry.cn-chengdu.aliyuncs.com/sku3d/maintest: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/sku3d/main registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '1.0.13' context: sku3d/ dockerfile: sku3d/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/sku3d/main: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/dadongmaintest registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '0.0.1' context: sku3d/ dockerfile: sku3d/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/dadongmaintest: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/dadongmain registry: registry.cn-chengdu.aliyuncs.com mirror: https://17itejgx.mirror.aliyuncs.com tags: - latest - '0.0.1' context: sku3d/ dockerfile: sku3d/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/dadongmain:latest - docker-compose up -d - docker-compose ps when: branch: - dadongrelease trigger: branch: - test - release - dadongrelease - dadongtest event: - push