Skip to content

Commit

Permalink
Merge branch 'feature/sql-in-image' into 'develop'
Browse files Browse the repository at this point in the history
Adding SQL resources to the final image

See merge request upm-inesdata/inesdata-connector!17
  • Loading branch information
ralconada-gmv committed May 31, 2024
2 parents 94a3260 + 1fd5216 commit 8e75ff7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- master
- develop
- feature/pipeline-*
tags:
- v*
env:
Expand Down Expand Up @@ -36,7 +35,7 @@ jobs:
#
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=ghcr.io/$IMAGE_NAME
# This changes all uppercase characters to lowercase.
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
Expand All @@ -45,7 +44,7 @@ jobs:
# This strips the "v" prefix from the tag name.
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# This uses the Docker `latest` tag convention.
[ "$VERSION" == "main" ] && VERSION=latest
[ "$VERSION" == "develop" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
Expand Down
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ RUN mkdir -p ${CONNECTOR_RESOURCES}
RUN chown -R ${USER_NAME}:0 ${CONNECTOR_HOME} \
&& chmod -R g=u ${CONNECTOR_HOME}

# Helpful utility while the connector is not able to create its own database
RUN apt-get update && apt-get install -y postgresql-client

# User by default
USER ${USER_NAME}

Expand All @@ -27,6 +30,8 @@ WORKDIR ${CONNECTOR_HOME}

# Copy connector
COPY $CONNECTOR_JAR connector.jar
COPY resources/* ${CONNECTOR_RESOURCES}/


# Use "exec" for Kubernetes graceful termination (SIGINT) to reach JVM.
ENTRYPOINT [ "sh", "-c", \
Expand Down

0 comments on commit 8e75ff7

Please sign in to comment.