-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from bcgov/feature/terraform-travis-commit
Feature/terraform travis commit
- Loading branch information
Showing
15 changed files
with
132 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
#!/bin/bash | ||
|
||
#make sure in the right directory | ||
cd /home/travis/build/bcgov/OCWA/frontend | ||
|
||
QUAYIO_REPO=$1 | ||
QUAYIO_BASE="quay.io/ikethecoder" | ||
|
||
echo "Logging into Quay..." | ||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
echo "logged in to quay, building now"; | ||
docker build -t quay.io/ikethecoder/$QUAYIO_REPO . | ||
echo "dockerfile built pushing now"; | ||
docker push quay.io/ikethecoder/$QUAYIO_REPO | ||
echo "push to quay done successfully"; | ||
|
||
echo "Building Docker image..." | ||
docker build -t $QUAYIO_BASE/$QUAYIO_REPO . | ||
|
||
echo "Pushing image $QUAYIO_REPO to Quay..." | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO | ||
if [ ! -z "$TRAVIS_BRANCH" ]; then | ||
echo "Tagging image $QUAYIO_REPO with ${TRAVIS_BRANCH/\//-} on Quay..." | ||
docker tag $QUAYIO_BASE/$QUAYIO_REPO $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
fi | ||
|
||
echo "Docker image push completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#!/bin/bash | ||
QUAYIO_REPO=$1 | ||
QUAYIO_BASE="quay.io/ikethecoder" | ||
|
||
#make sure in the right directory | ||
cd /home/travis/build/bcgov/OCWA/microservices/forumApi | ||
echo "Logging into Quay..." | ||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
|
||
echo "Building Docker image..." | ||
docker build -t $QUAYIO_BASE/$QUAYIO_REPO . | ||
|
||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
echo "logged in, building now"; | ||
docker build -t quay.io/ikethecoder/ocwa_forum_api . | ||
echo "dockerfile built pushing now"; | ||
docker push quay.io/ikethecoder/ocwa_forum_api | ||
echo "push done successfully"; | ||
echo "Pushing image $QUAYIO_REPO to Quay..." | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO | ||
if [ ! -z "$TRAVIS_BRANCH" ]; then | ||
echo "Tagging image $QUAYIO_REPO with ${TRAVIS_BRANCH/\//-} on Quay..." | ||
docker tag $QUAYIO_BASE/$QUAYIO_REPO $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
fi | ||
|
||
echo "Docker image push completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#!/bin/bash | ||
QUAYIO_REPO=$1 | ||
QUAYIO_BASE="quay.io/ikethecoder" | ||
|
||
#make sure in the right directory | ||
cd /home/travis/build/bcgov/OCWA/microservices/policyApi | ||
echo "Logging into Quay..." | ||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
|
||
echo "Building Docker image..." | ||
docker build -t $QUAYIO_BASE/$QUAYIO_REPO . | ||
|
||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
echo "logged in, building now"; | ||
docker build -t quay.io/ikethecoder/ocwa_policy_api . | ||
echo "dockerfile built pushing now"; | ||
docker push quay.io/ikethecoder/ocwa_policy_api | ||
echo "push done successfully"; | ||
echo "Pushing image $QUAYIO_REPO to Quay..." | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO | ||
if [ ! -z "$TRAVIS_BRANCH" ]; then | ||
echo "Tagging image $QUAYIO_REPO with ${TRAVIS_BRANCH/\//-} on Quay..." | ||
docker tag $QUAYIO_BASE/$QUAYIO_REPO $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
fi | ||
|
||
echo "Docker image push completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#!/bin/bash | ||
QUAYIO_REPO=$1 | ||
QUAYIO_BASE="quay.io/ikethecoder" | ||
|
||
#make sure in the right directory | ||
cd /home/travis/build/bcgov/OCWA/microservices/requestApi | ||
echo "Logging into Quay..." | ||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
|
||
echo "Building Docker image..." | ||
docker build -t $QUAYIO_BASE/$QUAYIO_REPO . | ||
|
||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
echo "logged in, building now"; | ||
docker build -t quay.io/ikethecoder/ocwa_request_api . | ||
echo "dockerfile built pushing now"; | ||
docker push quay.io/ikethecoder/ocwa_request_api | ||
echo "push done successfully"; | ||
echo "Pushing image $QUAYIO_REPO to Quay..." | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO | ||
if [ ! -z "$TRAVIS_BRANCH" ]; then | ||
echo "Tagging image $QUAYIO_REPO with ${TRAVIS_BRANCH/\//-} on Quay..." | ||
docker tag $QUAYIO_BASE/$QUAYIO_REPO $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
fi | ||
|
||
echo "Docker image push completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#!/bin/bash | ||
QUAYIO_REPO=$1 | ||
QUAYIO_BASE="quay.io/ikethecoder" | ||
|
||
#make sure in the right directory | ||
cd /home/travis/build/bcgov/OCWA/microservices/validateApi | ||
echo "Logging into Quay..." | ||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
|
||
echo "Building Docker image..." | ||
docker build -t $QUAYIO_BASE/$QUAYIO_REPO . | ||
|
||
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USERNAME" --password-stdin quay.io | ||
echo "logged in, building now"; | ||
docker build -t quay.io/ikethecoder/ocwa_validate_api . | ||
echo "dockerfile built pushing now"; | ||
docker push quay.io/ikethecoder/ocwa_validate_api | ||
echo "push done successfully"; | ||
echo "Pushing image $QUAYIO_REPO to Quay..." | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO | ||
if [ ! -z "$TRAVIS_BRANCH" ]; then | ||
echo "Tagging image $QUAYIO_REPO with ${TRAVIS_BRANCH/\//-} on Quay..." | ||
docker tag $QUAYIO_BASE/$QUAYIO_REPO $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
docker push $QUAYIO_BASE/$QUAYIO_REPO:${TRAVIS_BRANCH/\//-} | ||
fi | ||
|
||
echo "Docker image push completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
from string import Template | ||
|
||
template = """ | ||
images = { | ||
owner = "quay.io/ikethecoder" | ||
request_api = ":${TAG}" | ||
policy_api = ":${TAG}" | ||
validate_api = ":${TAG}" | ||
forum_api = ":${TAG}" | ||
frontend = ":${TAG}" | ||
minio = ":latest" | ||
tusd = ":latest" | ||
} | ||
""" | ||
|
||
s = Template(template) | ||
|
||
with open('terraform.auto.tfvars', 'w') as the_file: | ||
the_file.write(s.substitute(TAG=os.environ['TRAVIS_BRANCH'].replace('/', '-'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters