|
| 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-php |
| 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_node_test |
| 41 | + image: fabiodcorreia/base-php:test |
| 42 | + pull: always |
| 43 | + environment: |
| 44 | + PUID: "1000" |
| 45 | + PGID: "1000" |
| 46 | + commands: |
| 47 | + - sleep 60 |
| 48 | + - sh ./test/start.sh |
| 49 | + |
| 50 | +depends_on: |
| 51 | + - build-test-build |
| 52 | + |
| 53 | +--- |
| 54 | +kind: pipeline |
| 55 | +type: docker |
| 56 | +name: docker-amd64 |
| 57 | + |
| 58 | +platform: |
| 59 | + os: linux |
| 60 | + arch: amd64 |
| 61 | + |
| 62 | +trigger: |
| 63 | + event: |
| 64 | + - tag |
| 65 | + |
| 66 | +steps: |
| 67 | + - name: build and publish amd64 |
| 68 | + image: plugins/docker:linux-amd64 |
| 69 | + settings: |
| 70 | + build_args: |
| 71 | + - BUILD_DATE=${DRONE_BUILD_FINISHED} |
| 72 | + - VERSION=${DRONE_TAG} |
| 73 | + username: |
| 74 | + from_secret: DOCKERHUB_USERNAME |
| 75 | + password: |
| 76 | + from_secret: DOCKERHUB_PASSWORD |
| 77 | + repo: fabiodcorreia/base-php |
| 78 | + auto_tag: true |
| 79 | + auto_tag_suffix: amd64 |
| 80 | + purge: true |
| 81 | + |
| 82 | +--- |
| 83 | +kind: pipeline |
| 84 | +type: docker |
| 85 | +name: docker-arm64 |
| 86 | + |
| 87 | +platform: |
| 88 | + os: linux |
| 89 | + arch: arm64 |
| 90 | + |
| 91 | +trigger: |
| 92 | + event: |
| 93 | + - tag |
| 94 | + |
| 95 | +steps: |
| 96 | + - name: build and publish arm64v8 |
| 97 | + image: plugins/docker:linux-arm64 |
| 98 | + settings: |
| 99 | + build_args: |
| 100 | + - BUILD_DATE=${DRONE_BUILD_FINISHED} |
| 101 | + - VERSION=${DRONE_TAG} |
| 102 | + username: |
| 103 | + from_secret: DOCKERHUB_USERNAME |
| 104 | + password: |
| 105 | + from_secret: DOCKERHUB_PASSWORD |
| 106 | + repo: fabiodcorreia/base-php |
| 107 | + auto_tag: true |
| 108 | + auto_tag_suffix: arm64v8 |
| 109 | + purge: true |
| 110 | + |
| 111 | +--- |
| 112 | +kind: pipeline |
| 113 | +type: docker |
| 114 | +name: docker-arm32 |
| 115 | + |
| 116 | +platform: |
| 117 | + os: linux |
| 118 | + arch: arm |
| 119 | + |
| 120 | +trigger: |
| 121 | + event: |
| 122 | + - tag |
| 123 | + |
| 124 | +steps: |
| 125 | + - name: build and publish arm32v7 |
| 126 | + image: plugins/docker:linux-arm |
| 127 | + settings: |
| 128 | + build_args: |
| 129 | + - BUILD_DATE=${DRONE_BUILD_FINISHED} |
| 130 | + - VERSION=${DRONE_TAG} |
| 131 | + username: |
| 132 | + from_secret: DOCKERHUB_USERNAME |
| 133 | + password: |
| 134 | + from_secret: DOCKERHUB_PASSWORD |
| 135 | + repo: fabiodcorreia/base-php |
| 136 | + auto_tag: true |
| 137 | + auto_tag_suffix: arm32v7 |
| 138 | + purge: true |
| 139 | + |
| 140 | +--- |
| 141 | +kind: pipeline |
| 142 | +type: docker |
| 143 | +name: docker-manifest |
| 144 | + |
| 145 | +platform: |
| 146 | + os: linux |
| 147 | + arch: amd64 |
| 148 | + |
| 149 | +trigger: |
| 150 | + event: |
| 151 | + - tag |
| 152 | + |
| 153 | +depends_on: |
| 154 | + - docker-amd64 |
| 155 | + - docker-arm64 |
| 156 | + - docker-arm32 |
| 157 | + |
| 158 | +steps: |
| 159 | + - name: manifest |
| 160 | + pull: always |
| 161 | + image: plugins/manifest |
| 162 | + settings: |
| 163 | + auto_tag: true |
| 164 | + ignore_missing: true |
| 165 | + spec: manifest.tmpl |
| 166 | + username: |
| 167 | + from_secret: DOCKERHUB_USERNAME |
| 168 | + password: |
| 169 | + from_secret: DOCKERHUB_PASSWORD |
| 170 | + - name: manifest latest |
| 171 | + pull: always |
| 172 | + image: plugins/manifest |
| 173 | + settings: |
| 174 | + tag: latest |
| 175 | + ignore_missing: true |
| 176 | + spec: manifest.tmpl |
| 177 | + username: |
| 178 | + from_secret: DOCKERHUB_USERNAME |
| 179 | + password: |
| 180 | + from_secret: DOCKERHUB_PASSWORD |
0 commit comments