Skip to content

Commit

Permalink
improve build image
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc committed Nov 24, 2022
1 parent 6cb6019 commit cc9a39c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/publish_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ jobs:
map: |
{
"push": {
"FRAMEWORK_IMAGE_URL": "hugegraph/hugegraph-computer-framework:latest",
"ALGORITHM_IMAGE_URL": "hugegraph/hugegraph-builtin-algorithms:latest",
"COMPUTER_IMAGE_URL": "hugegraph/hugegraph-computer:latest",
"OPERATOR_IMAGE_URL": "hugegraph/hugegraph-computer-operator:latest"
},
"release": {
"FRAMEWORK_IMAGE_URL": "hugegraph/hugegraph-computer-framework:${{ github.ref_name }}",
"ALGORITHM_IMAGE_URL": "hugegraph/hugegraph-builtin-algorithms:${{ github.ref_name }}",
"COMPUTER_IMAGE_URL": "hugegraph/hugegraph-computer:${{ github.ref_name }}",
"OPERATOR_IMAGE_URL": "hugegraph/hugegraph-computer-operator:${{ github.ref_name }}"
}
}
Expand Down Expand Up @@ -58,13 +56,12 @@ jobs:
- name: Build images
env:
TRAVIS_DIR: computer-dist/src/assembly/travis
run: $TRAVIS_DIR/build-images.sh ${{ env.FRAMEWORK_IMAGE_URL }} ${{ env.ALGORITHM_IMAGE_URL }} ${{ env.OPERATOR_IMAGE_URL }}
run: $TRAVIS_DIR/build-images.sh ${{ env.COMPUTER_IMAGE_URL }} ${{ env.OPERATOR_IMAGE_URL }}

- name: Docker images
run: docker images

- name: Publish
run: |
docker push ${{ env.FRAMEWORK_IMAGE_URL }}
docker push ${{ env.ALGORITHM_IMAGE_URL }}
docker push ${{ env.COMPUTER_IMAGE_URL }}
docker push ${{ env.OPERATOR_IMAGE_URL }}
1 change: 1 addition & 0 deletions computer-dist/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ LABEL maintainer="HugeGraph Docker Maintainers <dev@hugegraph.apache.org>"
ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseParallelGC -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm"
COPY ./bin /etc/local/hugegraph-computer/bin
COPY ./lib /etc/local/hugegraph-computer/lib
COPY ./algorithm /etc/local/hugegraph-computer/algorithm
WORKDIR /etc/local/hugegraph-computer
RUN apt-get update && apt-get -y install gettext-base && apt-get -y install wget
8 changes: 1 addition & 7 deletions computer-dist/src/assembly/travis/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,4 @@ PROJECT_VERSION=$(mvn -f "${PROJECT_POM_PATH}" -q -N \

docker build -t $1 $CONTEXT_PATH -f $PROJECT_PATH/computer-dist/Dockerfile

echo "FROM $1
LABEL maintainer='HugeGraph Docker Maintainers <dev@hugegraph.apache.org>'
COPY target/computer-algorithm-*.jar $JAR_FILE_PATH
ENV JAR_FILE_PATH=$JAR_FILE_PATH" | \
docker build -t $2 -f - $PROJECT_PATH/computer-algorithm

docker build -t $3 -f $PROJECT_PATH/computer-k8s-operator/Dockerfile $PROJECT_PATH/computer-k8s-operator
docker build -t $2 -f $PROJECT_PATH/computer-k8s-operator/Dockerfile $PROJECT_PATH/computer-k8s-operator

0 comments on commit cc9a39c

Please sign in to comment.