|
| 1 | +kind: pipeline |
| 2 | +type: docker |
| 3 | +name: build-test-build |
| 4 | + |
| 5 | +platform: |
| 6 | + os: linux |
| 7 | + arch: amd64 |
| 8 | + |
| 9 | +trigger: |
| 10 | + event: |
| 11 | + - push |
| 12 | + |
| 13 | +steps: |
| 14 | + - name: build test image |
| 15 | + image: plugins/docker:linux-amd64 |
| 16 | + settings: |
| 17 | + username: |
| 18 | + from_secret: DOCKERHUB_USERNAME |
| 19 | + password: |
| 20 | + from_secret: DOCKERHUB_PASSWORD |
| 21 | + repo: fabiodcorreia/base-python |
| 22 | + auto_tag: true |
| 23 | + auto_tag_suffix: test |
| 24 | + purge: true |
| 25 | + |
| 26 | +--- |
| 27 | +kind: pipeline |
| 28 | +type: docker |
| 29 | +name: docker-test |
| 30 | + |
| 31 | +platform: |
| 32 | + os: linux |
| 33 | + arch: amd64 |
| 34 | + |
| 35 | +trigger: |
| 36 | + status: |
| 37 | + - success |
| 38 | + |
| 39 | +steps: |
| 40 | + - name: base_python_test |
| 41 | + image: fabiodcorreia/base-python:test |
| 42 | + # ports: [ 80 ] |
| 43 | + detach: true |
| 44 | + pull: always |
| 45 | + environment: |
| 46 | + PUID: "1000" |
| 47 | + PGID: "1000" |
| 48 | + |
| 49 | + #- name: test image |
| 50 | + # image: python:2.7.18-alpine |
| 51 | + # commands: |
| 52 | + # - sleep 60 |
| 53 | + # - sh ./test/start.sh |
| 54 | + |
| 55 | +depends_on: |
| 56 | + - build-test-build |
| 57 | + |
| 58 | +--- |
| 59 | +kind: pipeline |
| 60 | +type: docker |
| 61 | +name: docker-amd64 |
| 62 | + |
| 63 | +platform: |
| 64 | + os: linux |
| 65 | + arch: amd64 |
| 66 | + |
| 67 | +trigger: |
| 68 | + event: |
| 69 | + - tag |
| 70 | + |
| 71 | +steps: |
| 72 | + - name: build and publish amd64 |
| 73 | + image: plugins/docker:linux-amd64 |
| 74 | + settings: |
| 75 | + build_args: |
| 76 | + - BUILD_DATE=${DRONE_BUILD_FINISHED} |
| 77 | + - VERSION=${DRONE_TAG} |
| 78 | + username: |
| 79 | + from_secret: DOCKERHUB_USERNAME |
| 80 | + password: |
| 81 | + from_secret: DOCKERHUB_PASSWORD |
| 82 | + repo: fabiodcorreia/base-python |
| 83 | + auto_tag: true |
| 84 | + auto_tag_suffix: amd64 |
| 85 | + purge: true |
| 86 | + |
| 87 | +--- |
| 88 | +kind: pipeline |
| 89 | +type: docker |
| 90 | +name: docker-arm64 |
| 91 | + |
| 92 | +platform: |
| 93 | + os: linux |
| 94 | + arch: arm64 |
| 95 | + |
| 96 | +trigger: |
| 97 | + event: |
| 98 | + - tag |
| 99 | + |
| 100 | +steps: |
| 101 | + - name: build and publish arm64v8 |
| 102 | + image: plugins/docker:linux-arm64 |
| 103 | + settings: |
| 104 | + build_args: |
| 105 | + - BUILD_DATE=${DRONE_BUILD_FINISHED} |
| 106 | + - VERSION=${DRONE_TAG} |
| 107 | + username: |
| 108 | + from_secret: DOCKERHUB_USERNAME |
| 109 | + password: |
| 110 | + from_secret: DOCKERHUB_PASSWORD |
| 111 | + repo: fabiodcorreia/base-python |
| 112 | + auto_tag: true |
| 113 | + auto_tag_suffix: arm64v8 |
| 114 | + purge: true |
| 115 | + |
| 116 | +--- |
| 117 | +kind: pipeline |
| 118 | +type: docker |
| 119 | +name: docker-arm32 |
| 120 | + |
| 121 | +platform: |
| 122 | + os: linux |
| 123 | + arch: arm |
| 124 | + |
| 125 | +trigger: |
| 126 | + event: |
| 127 | + - tag |
| 128 | + |
| 129 | +steps: |
| 130 | + - name: build and publish arm32v7 |
| 131 | + image: plugins/docker:linux-arm |
| 132 | + settings: |
| 133 | + build_args: |
| 134 | + - BUILD_DATE=${DRONE_BUILD_FINISHED} |
| 135 | + - VERSION=${DRONE_TAG} |
| 136 | + username: |
| 137 | + from_secret: DOCKERHUB_USERNAME |
| 138 | + password: |
| 139 | + from_secret: DOCKERHUB_PASSWORD |
| 140 | + repo: fabiodcorreia/base-python |
| 141 | + auto_tag: true |
| 142 | + auto_tag_suffix: arm32v7 |
| 143 | + purge: true |
| 144 | + |
| 145 | +--- |
| 146 | +kind: pipeline |
| 147 | +type: docker |
| 148 | +name: docker-manifest |
| 149 | + |
| 150 | +platform: |
| 151 | + os: linux |
| 152 | + arch: amd64 |
| 153 | + |
| 154 | +trigger: |
| 155 | + event: |
| 156 | + - tag |
| 157 | + |
| 158 | +depends_on: |
| 159 | + - docker-amd64 |
| 160 | + - docker-arm64 |
| 161 | + - docker-arm32 |
| 162 | + |
| 163 | +steps: |
| 164 | + - name: manifest |
| 165 | + pull: always |
| 166 | + image: plugins/manifest |
| 167 | + settings: |
| 168 | + auto_tag: true |
| 169 | + ignore_missing: true |
| 170 | + spec: manifest.tmpl |
| 171 | + username: |
| 172 | + from_secret: DOCKERHUB_USERNAME |
| 173 | + password: |
| 174 | + from_secret: DOCKERHUB_PASSWORD |
| 175 | + - name: manifest latest |
| 176 | + pull: always |
| 177 | + image: plugins/manifest |
| 178 | + settings: |
| 179 | + tag: latest |
| 180 | + ignore_missing: true |
| 181 | + spec: manifest.tmpl |
| 182 | + username: |
| 183 | + from_secret: DOCKERHUB_USERNAME |
| 184 | + password: |
| 185 | + from_secret: DOCKERHUB_PASSWORD |
0 commit comments