Fix Docker buildx images
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
This commit is contained in:
parent
31da3ea9ef
commit
9202c0bf67
44
.github/workflows/test-build-docker-image.yml
vendored
44
.github/workflows/test-build-docker-image.yml
vendored
|
|
@ -609,28 +609,38 @@ jobs:
|
||||||
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA}
|
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA}
|
||||||
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly
|
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly
|
||||||
|
|
||||||
- name: Build and push release image to Docker Hub
|
- name: Build and push full image to Docker Hub
|
||||||
if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
|
continue-on-error: true
|
||||||
working-directory: "."
|
working-directory: "."
|
||||||
run: |
|
run: |
|
||||||
tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{steps.vars.outputs.tag}}"
|
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
|
||||||
|
segment_ce_key="${{ secrets.APPSMITH_SEGMENT_CE_KEY }}"
|
||||||
|
tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${GITHUB_SHA}"
|
||||||
|
tag_args="$tag_args --tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:nightly"
|
||||||
|
else
|
||||||
|
segment_ce_key="${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }}"
|
||||||
|
tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{steps.vars.outputs.tag}}"
|
||||||
|
fi
|
||||||
|
|
||||||
docker buildx build \
|
uname -m
|
||||||
--platform linux/arm64,linux/amd64 \
|
load_amd64=""
|
||||||
--build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }} \
|
load_arm64=""
|
||||||
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
load_amd64="--load"
|
||||||
|
else
|
||||||
|
load_arm64="--load"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker buildx build $load_amd64 \
|
||||||
|
--platform linux/amd64 \
|
||||||
|
--build-arg APPSMITH_SEGMENT_CE_KEY="$segment_ce_key" \
|
||||||
$tag_args \
|
$tag_args \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Build and push master image to Docker Hub with commit tag
|
docker buildx build $load_arm64 \
|
||||||
if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
--platform linux/arm64 \
|
||||||
working-directory: "."
|
--build-arg APPSMITH_SEGMENT_CE_KEY="$segment_ce_key" \
|
||||||
run: |
|
|
||||||
tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${GITHUB_SHA}"
|
|
||||||
tag_args="$tag_args --tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:nightly"
|
|
||||||
|
|
||||||
docker buildx build \
|
|
||||||
--platform linux/arm64,linux/amd64 \
|
|
||||||
--build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} \
|
|
||||||
$tag_args \
|
$tag_args \
|
||||||
.
|
.
|
||||||
|
|
||||||
|
|
@ -653,6 +663,8 @@ jobs:
|
||||||
docker push --all-tags ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce
|
docker push --all-tags ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce
|
||||||
else
|
else
|
||||||
echo "Fat container test FAILED. Not pushing image."
|
echo "Fat container test FAILED. Not pushing image."
|
||||||
|
# Temporarily pushing even if test fails.
|
||||||
|
docker push --all-tags ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce
|
||||||
fi
|
fi
|
||||||
docker rm -f appsmith
|
docker rm -f appsmith
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,9 @@ if [[ -f .env ]]; then
|
||||||
source .env
|
source .env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source envs/dev.env
|
|
||||||
source ../util/is_wsl.sh
|
source ../util/is_wsl.sh
|
||||||
if [ $IS_WSL ]; then
|
if [ $IS_WSL ]; then
|
||||||
_JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true $_JAVA_OPTIONS"
|
_JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true $_JAVA_OPTIONS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(cd dist && exec java -Xmx500m -jar server-*.jar)
|
(cd dist && exec java -jar server-*.jar)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user