Skip to content

Commit 66ea704

Browse files
authored
Fixed deploy stage for travis-CI. (#64)
* Fixed deploy stage for travis-CI. The script provider in deploy stage apparently needs to be a scalar and hence cannot take multiple commands. We therefore need to setup the `docker login` in a stage before the deploy begins. * Fixed the deployment script.
1 parent b7f0f57 commit 66ea704

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ script:
1616
-Ddeployment_image_name="public/azure-application-gateway/kubernetes-ingress"
1717
-Ddeployment_image_version="$IMAGE_VERSION"
1818
- cmake --build .
19-
19+
2020
deploy:
2121
provider: script
2222
skip_cleanup: true
23-
script:
24-
- echo "$DOCKER_PASSWORD" | docker login $ACR_REGISTRY -u "$DOCKER_USERNAME" --password-stdin
25-
- cd $TRAVIS_BUILD_DIR/build && cmake --build . --target dockerpush
23+
script: $TRAVIS_BUILD_DIR/scripts/deploy.sh
2624
on:
2725
repo: Azure/application-gateway-kubernetes-ingress
2826
tags: true

scripts/deploy.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
echo "Logging into docker...."
3+
echo "$DOCKER_PASSWORD" | docker login $ACR_REGISTRY -u "$DOCKER_USERNAME" --password-stdin
4+
echo "Login successful. Getting ready to deploy."
5+
6+
set -x
7+
pushd $TRAVIS_BUILD_DIR/build
8+
cmake --build . --target dockerpush
9+
popd
10+
set +x

0 commit comments

Comments
 (0)