|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: BuildThirdpartyDocker - build and publish thirdparty |
| 19 | + |
| 20 | +on: |
| 21 | + workflow_call: |
| 22 | + inputs: |
| 23 | + osversion: |
| 24 | + required: true |
| 25 | + type: string |
| 26 | + |
| 27 | +jobs: |
| 28 | + build_push_src_docker_images: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - name: Set up QEMU |
| 33 | + uses: docker/setup-qemu-action@v1 |
| 34 | + - name: Set up Docker Buildx |
| 35 | + uses: docker/setup-buildx-action@v1 |
| 36 | + - name: Login to DockerHub |
| 37 | + uses: docker/login-action@v1 |
| 38 | + with: |
| 39 | + username: ${{ secrets.DOCKERHUB_USER }} |
| 40 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 41 | + - name: Build and push |
| 42 | + |
| 43 | + with: |
| 44 | + context: . |
| 45 | + file: ./docker/thirdparties-src/Dockerfile |
| 46 | + push: true |
| 47 | + tags: | |
| 48 | + apache/pegasus:thirdparties-src-${{ inputs.osversion }}-${{ github.ref_name }} |
| 49 | + build-args: | |
| 50 | + GITHUB_BRANCH=${{ github.ref_name }} |
| 51 | + OS_VERSION=${{ inputs.osversion }} |
| 52 | + HADOOP_BIN_PATH=hadoop-bin |
| 53 | + ZOOKEEPER_BIN_PATH=zookeeper-bin |
| 54 | +
|
| 55 | + build_push_bin_docker_images: |
| 56 | + runs-on: ubuntu-latest |
| 57 | + env: |
| 58 | + # The glibc version on ubuntu1804 is lower than the node20 required, so |
| 59 | + # we need to force the node version to 16. |
| 60 | + # See more details: https://github.com/actions/checkout/issues/1809 |
| 61 | + ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 |
| 62 | + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true |
| 63 | + needs: build_push_src_docker_images |
| 64 | + steps: |
| 65 | + # The glibc version on ubuntu1804 is lower than the actions/checkout@v4 required, so |
| 66 | + # we need to force to use actions/checkout@v3. |
| 67 | + - uses: actions/checkout@v3 |
| 68 | + - name: Set up QEMU |
| 69 | + uses: docker/setup-qemu-action@v1 |
| 70 | + - name: Set up Docker Buildx |
| 71 | + uses: docker/setup-buildx-action@v1 |
| 72 | + - name: Login to DockerHub |
| 73 | + uses: docker/login-action@v1 |
| 74 | + with: |
| 75 | + username: ${{ secrets.DOCKERHUB_USER }} |
| 76 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 77 | + - name: Build and push for production |
| 78 | + |
| 79 | + with: |
| 80 | + context: . |
| 81 | + file: ./docker/thirdparties-bin/Dockerfile |
| 82 | + push: true |
| 83 | + tags: | |
| 84 | + apache/pegasus:thirdparties-bin-${{ inputs.osversion }}-${{ github.ref_name }} |
| 85 | + build-args: | |
| 86 | + GITHUB_BRANCH=${{ github.ref_name }} |
| 87 | + OS_VERSION=${{ inputs.osversion }} |
| 88 | + HADOOP_BIN_PATH=hadoop-bin |
| 89 | + ZOOKEEPER_BIN_PATH=zookeeper-bin |
| 90 | +
|
| 91 | + build_push_bin_jemalloc_docker_images: |
| 92 | + runs-on: ubuntu-latest |
| 93 | + env: |
| 94 | + # The glibc version on ubuntu1804 is lower than the node20 required, so |
| 95 | + # we need to force the node version to 16. |
| 96 | + # See more details: https://github.com/actions/checkout/issues/1809 |
| 97 | + ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 |
| 98 | + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true |
| 99 | + needs: build_push_src_docker_images |
| 100 | + steps: |
| 101 | + # The glibc version on ubuntu1804 is lower than the actions/checkout@v4 required, so |
| 102 | + # we need to force to use actions/checkout@v3. |
| 103 | + - uses: actions/checkout@v3 |
| 104 | + - name: Set up QEMU |
| 105 | + uses: docker/setup-qemu-action@v1 |
| 106 | + - name: Set up Docker Buildx |
| 107 | + uses: docker/setup-buildx-action@v1 |
| 108 | + - name: Login to DockerHub |
| 109 | + uses: docker/login-action@v1 |
| 110 | + with: |
| 111 | + username: ${{ secrets.DOCKERHUB_USER }} |
| 112 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 113 | + - name: Build and push for production with jemalloc |
| 114 | + |
| 115 | + with: |
| 116 | + context: . |
| 117 | + file: ./docker/thirdparties-bin/Dockerfile |
| 118 | + push: true |
| 119 | + tags: | |
| 120 | + apache/pegasus:thirdparties-bin-jemallc-${{ inputs.osversion }}-${{ github.ref_name }} |
| 121 | + build-args: | |
| 122 | + GITHUB_BRANCH=${{ github.ref_name }} |
| 123 | + OS_VERSION=${{ inputs.osversion }} |
| 124 | + USE_JEMALLOC=ON |
| 125 | + HADOOP_BIN_PATH=hadoop-bin |
| 126 | + ZOOKEEPER_BIN_PATH=zookeeper-bin |
| 127 | +
|
| 128 | + build_push_bin_test_docker_images: |
| 129 | + runs-on: ubuntu-latest |
| 130 | + needs: build_push_src_docker_images |
| 131 | + steps: |
| 132 | + - uses: actions/checkout@v4 |
| 133 | + - name: Set up QEMU |
| 134 | + uses: docker/setup-qemu-action@v1 |
| 135 | + - name: Set up Docker Buildx |
| 136 | + uses: docker/setup-buildx-action@v1 |
| 137 | + - name: Login to DockerHub |
| 138 | + uses: docker/login-action@v1 |
| 139 | + with: |
| 140 | + username: ${{ secrets.DOCKERHUB_USER }} |
| 141 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 142 | + - name: Build and push for test |
| 143 | + |
| 144 | + with: |
| 145 | + context: . |
| 146 | + file: ./docker/thirdparties-bin/Dockerfile |
| 147 | + push: true |
| 148 | + tags: | |
| 149 | + apache/pegasus:thirdparties-bin-test-${{ inputs.osversion }}-${{ github.ref_name }} |
| 150 | + build-args: | |
| 151 | + GITHUB_BRANCH=${{ github.ref_name }} |
| 152 | + OS_VERSION=${{ inputs.osversion }} |
| 153 | + ROCKSDB_PORTABLE=1 |
| 154 | + HADOOP_BIN_PATH=hadoop-bin |
| 155 | + ZOOKEEPER_BIN_PATH=zookeeper-bin |
| 156 | +
|
| 157 | + build_push_bin_test_jemalloc_docker_images: |
| 158 | + runs-on: ubuntu-latest |
| 159 | + needs: build_push_src_docker_images |
| 160 | + steps: |
| 161 | + - uses: actions/checkout@v4 |
| 162 | + - name: Set up QEMU |
| 163 | + uses: docker/setup-qemu-action@v1 |
| 164 | + - name: Set up Docker Buildx |
| 165 | + uses: docker/setup-buildx-action@v1 |
| 166 | + - name: Login to DockerHub |
| 167 | + uses: docker/login-action@v1 |
| 168 | + with: |
| 169 | + username: ${{ secrets.DOCKERHUB_USER }} |
| 170 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 171 | + - name: Build and push for test with jemalloc |
| 172 | + |
| 173 | + with: |
| 174 | + context: . |
| 175 | + file: ./docker/thirdparties-bin/Dockerfile |
| 176 | + push: true |
| 177 | + tags: | |
| 178 | + apache/pegasus:thirdparties-bin-test-jemallc-${{ inputs.osversion }}-${{ github.ref_name }} |
| 179 | + build-args: | |
| 180 | + GITHUB_BRANCH=${{ github.ref_name }} |
| 181 | + OS_VERSION=${{ inputs.osversion }} |
| 182 | + ROCKSDB_PORTABLE=1 |
| 183 | + USE_JEMALLOC=ON |
| 184 | + HADOOP_BIN_PATH=hadoop-bin |
| 185 | + ZOOKEEPER_BIN_PATH=zookeeper-bin |
0 commit comments