Update .gitlab-ci.yml file
This commit is contained in:
parent
caf5c63896
commit
514e8a3abe
1 changed files with 3 additions and 2 deletions
|
@ -19,12 +19,12 @@ build-push-docker-image-job:
|
|||
script:
|
||||
- echo "Building..." # MAKE SURE NO SPACE ON EITHER SIDE OF = IN THE FOLLOWING LINE
|
||||
- export CONTAINER_FULL_IMAGE_NAME_WITH_TAG=$IMAGE_NAME_WITH_REGISTRY_PREFIX/my-build-image:$COMMIT_HASH
|
||||
- docker build -f ./Dockerfile --pull -t built-image-name .
|
||||
- docker build --network=host -f ./Dockerfile --pull -t built-image-name .
|
||||
- docker tag built-image-name "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
|
||||
- docker push "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
|
||||
- echo "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
|
||||
- echo "Deploying on CapRover..."
|
||||
- docker run caprover/cli-caprover:2.2.3 caprover deploy --caproverUrl "$CAPROVER_URL" --caproverPassword "$CAPROVER_PASSWORD" -a "$CAPROVER_APP" -i "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
|
||||
- docker run --network=host caprover/cli-caprover:2.2.3 caprover deploy --caproverUrl "$CAPROVER_URL" --caproverPassword "$CAPROVER_PASSWORD" -a "$CAPROVER_APP" -i "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
|
||||
only:
|
||||
- main
|
||||
variables:
|
||||
|
@ -37,3 +37,4 @@ build-push-docker-image-job:
|
|||
CAPROVER_URL: ${CAPROVER_URL}
|
||||
CAPROVER_PASSWORD: ${CAPROVER_PASSWORD}
|
||||
CAPROVER_APP: ${CAPROVER_APP}
|
||||
|
||||
|
|
Loading…
Reference in a new issue