|
| 1 | +stages: |
| 2 | + - test-image |
| 3 | + |
| 4 | +.job_template: &test_image_definition |
| 5 | + image: docker:19 |
| 6 | + stage: test-image |
| 7 | + services: |
| 8 | + - alias: docker |
| 9 | + name: docker:19.03.5-dind |
| 10 | + script: |
| 11 | + - apk add --no-cache bash |
| 12 | + - chmod +x extended-postgres/test/images_test.sh |
| 13 | + - TAG=${TAG} PG_IMAGE_NAME="${DOCKER_NAME}" PG_SERVER_VERSION=${PG_SERVER_VERSION} CREATE_EXTENSION_EXCLUDE=${CREATE_EXTENSION_EXCLUDE} bash extended-postgres/test/images_test.sh |
| 14 | + |
| 15 | +.only_tag_template: &only_release |
| 16 | + rules: |
| 17 | + - if: $CI_COMMIT_TAG =~ /^[0-9.]+$/ || $COMMIT_TAG =~ /^[0-9.]+$/ |
| 18 | + when: always |
| 19 | + |
| 20 | +.release_vars: |
| 21 | + variables: &release_vars |
| 22 | + TAG: $CI_COMMIT_TAG |
| 23 | + DOCKER_NAME: "postgresai/extended-postgres" |
| 24 | + |
| 25 | +.only_branch_template: &only_branch |
| 26 | + rules: |
| 27 | + - if: $CI_COMMIT_TAG =~ /^[0-9.]+$/ || $COMMIT_TAG =~ /^[0-9.]+$/ |
| 28 | + when: never |
| 29 | + - if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_SLUG != "master" |
| 30 | + when: manual |
| 31 | + |
| 32 | +.branch_vars: |
| 33 | + variables: &branch_vars |
| 34 | + TAG: $CI_COMMIT_REF_SLUG |
| 35 | + DOCKER_NAME: "${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/extended-postgres" |
| 36 | + |
| 37 | +test-extended-postgres-9-6-image-latest: |
| 38 | + <<: *test_image_definition |
| 39 | + <<: *only_release |
| 40 | + dependencies: |
| 41 | + - build-extended-postgres-9-6-image-latest |
| 42 | + variables: |
| 43 | + <<: *release_vars |
| 44 | + PG_SERVER_VERSION: "9.6" |
| 45 | + CREATE_EXTENSION_EXCLUDE: "pg_cron" |
| 46 | + |
| 47 | +test-extended-postgres-10-image-latest: |
| 48 | + <<: *test_image_definition |
| 49 | + <<: *only_release |
| 50 | + dependencies: |
| 51 | + - build-extended-postgres-10-image-latest |
| 52 | + variables: |
| 53 | + <<: *release_vars |
| 54 | + PG_SERVER_VERSION: "10" |
| 55 | + |
| 56 | +test-extended-postgres-11-image-latest: |
| 57 | + <<: *test_image_definition |
| 58 | + <<: *only_release |
| 59 | + dependencies: |
| 60 | + - build-extended-postgres-11-image-latest |
| 61 | + variables: |
| 62 | + <<: *release_vars |
| 63 | + PG_SERVER_VERSION: "11" |
| 64 | + |
| 65 | +test-extended-postgres-12-image-latest: |
| 66 | + <<: *test_image_definition |
| 67 | + <<: *only_release |
| 68 | + dependencies: |
| 69 | + - build-extended-postgres-12-image-latest |
| 70 | + variables: |
| 71 | + <<: *release_vars |
| 72 | + PG_SERVER_VERSION: "12" |
| 73 | + |
| 74 | +test-extended-postgres-13-image-latest: |
| 75 | + <<: *test_image_definition |
| 76 | + <<: *only_release |
| 77 | + dependencies: |
| 78 | + - build-extended-postgres-13-image-latest |
| 79 | + variables: |
| 80 | + <<: *release_vars |
| 81 | + PG_SERVER_VERSION: "13" |
| 82 | + |
| 83 | +test-extended-postgres-14-image-latest: |
| 84 | + <<: *test_image_definition |
| 85 | + <<: *only_release |
| 86 | + dependencies: |
| 87 | + - build-extended-postgres-14-image-latest |
| 88 | + variables: |
| 89 | + <<: *release_vars |
| 90 | + PG_SERVER_VERSION: "14" |
| 91 | + |
| 92 | +test-extended-postgres-15-image-latest: |
| 93 | + <<: *test_image_definition |
| 94 | + <<: *only_release |
| 95 | + dependencies: |
| 96 | + - build-extended-postgres-15-image-latest |
| 97 | + variables: |
| 98 | + <<: *release_vars |
| 99 | + PG_SERVER_VERSION: "15" |
| 100 | + |
| 101 | +test-extended-postgres-16-image-latest: |
| 102 | + <<: *test_image_definition |
| 103 | + <<: *only_release |
| 104 | + dependencies: |
| 105 | + - build-extended-postgres-16-image-latest |
| 106 | + variables: |
| 107 | + <<: *release_vars |
| 108 | + PG_SERVER_VERSION: "16" |
| 109 | + |
| 110 | +test-extended-postgres-17-image-latest: |
| 111 | + <<: *test_image_definition |
| 112 | + <<: *only_release |
| 113 | + dependencies: |
| 114 | + - build-extended-postgres-17-image-latest |
| 115 | + variables: |
| 116 | + <<: *release_vars |
| 117 | + PG_SERVER_VERSION: "17" |
| 118 | + |
| 119 | + |
| 120 | +test-extended-postgres-9-6-image-feature: |
| 121 | + <<: *test_image_definition |
| 122 | + <<: *only_branch |
| 123 | + dependencies: |
| 124 | + - build-extended-postgres-9-6-image-feature |
| 125 | + variables: |
| 126 | + <<: *branch_vars |
| 127 | + PG_SERVER_VERSION: "9.6" |
| 128 | + CREATE_EXTENSION_EXCLUDE: "pg_cron" |
| 129 | + |
| 130 | +test-extended-postgres-10-image-feature: |
| 131 | + <<: *test_image_definition |
| 132 | + <<: *only_branch |
| 133 | + dependencies: |
| 134 | + - build-extended-postgres-10-image-feature |
| 135 | + variables: |
| 136 | + <<: *branch_vars |
| 137 | + PG_SERVER_VERSION: "10" |
| 138 | + |
| 139 | +test-extended-postgres-11-image-feature: |
| 140 | + <<: *test_image_definition |
| 141 | + <<: *only_branch |
| 142 | + dependencies: |
| 143 | + - build-extended-postgres-11-image-feature |
| 144 | + variables: |
| 145 | + <<: *branch_vars |
| 146 | + PG_SERVER_VERSION: "11" |
| 147 | + |
| 148 | +test-extended-postgres-12-image-feature: |
| 149 | + <<: *test_image_definition |
| 150 | + <<: *only_branch |
| 151 | + dependencies: |
| 152 | + - build-extended-postgres-12-image-feature |
| 153 | + variables: |
| 154 | + <<: *branch_vars |
| 155 | + PG_SERVER_VERSION: "12" |
| 156 | + |
| 157 | +test-extended-postgres-13-image-feature: |
| 158 | + <<: *test_image_definition |
| 159 | + <<: *only_branch |
| 160 | + dependencies: |
| 161 | + - build-extended-postgres-13-image-feature |
| 162 | + variables: |
| 163 | + <<: *branch_vars |
| 164 | + PG_SERVER_VERSION: "13" |
| 165 | + |
| 166 | +test-extended-postgres-14-image-feature: |
| 167 | + <<: *test_image_definition |
| 168 | + <<: *only_branch |
| 169 | + dependencies: |
| 170 | + - build-extended-postgres-14-image-feature |
| 171 | + variables: |
| 172 | + <<: *branch_vars |
| 173 | + PG_SERVER_VERSION: "14" |
| 174 | + |
| 175 | +test-extended-postgres-15-image-feature: |
| 176 | + <<: *test_image_definition |
| 177 | + <<: *only_branch |
| 178 | + dependencies: |
| 179 | + - build-extended-postgres-15-image-feature |
| 180 | + variables: |
| 181 | + <<: *branch_vars |
| 182 | + PG_SERVER_VERSION: "15" |
| 183 | + |
| 184 | +test-extended-postgres-16-image-feature: |
| 185 | + <<: *test_image_definition |
| 186 | + <<: *only_branch |
| 187 | + dependencies: |
| 188 | + - build-extended-postgres-16-image-feature |
| 189 | + variables: |
| 190 | + <<: *branch_vars |
| 191 | + PG_SERVER_VERSION: "16" |
| 192 | + |
| 193 | +test-extended-postgres-17-image-feature: |
| 194 | + <<: *test_image_definition |
| 195 | + <<: *only_branch |
| 196 | + dependencies: |
| 197 | + - build-extended-postgres-17-image-feature |
| 198 | + variables: |
| 199 | + <<: *branch_vars |
| 200 | + PG_SERVER_VERSION: "17" |
0 commit comments