Skip to content

Commit

Permalink
BCDA-392: Swagger endpoint in AWS (#62)
Browse files Browse the repository at this point in the history
* BCDA-392: Update scripts so that swagger docs are incorporated in our RPM packages.

* BCDA-392: Include swaggerui directory in packaged rpm.

* BCDA-392: Map swaggerui correctly.

* BCDA-392: Update swaggerui directory to be in /etc/sv/api

* BCDA-392: Placing the executables in /usr/local/bin.
  • Loading branch information
msnook committed Nov 2, 2018
1 parent dbd08d0 commit c020216
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -3,10 +3,11 @@ release:
docker run --rm -e GITHUB_ACCESS_TOKEN='${GITHUB_ACCESS_TOKEN}' -e GITHUB_USER='${GITHUB_USER}' -e GITHUB_EMAIL='${GITHUB_EMAIL}' -e GITHUB_GPG_KEY_FILE='${GITHUB_GPG_KEY_FILE}' -v ${PWD}:/go/src/github.com/CMSgov/bcda-app release

package:
# This target should be executed by passing in an argument reprsenting the version of the artifacts we are packaging
# This target should be executed by passing in an argument representing the version of the artifacts we are packaging
# For example: make package version=r1
docker-compose up -d documentation
docker build -t packaging -f Dockerfiles/Dockerfile.package .
docker run -v ${PWD}:/go/src/github.com/CMSgov/bcda-app packaging $(version)
docker run --rm -v ${PWD}:/go/src/github.com/CMSgov/bcda-app packaging $(version)

test:
docker-compose up -d db queue
Expand Down
8 changes: 7 additions & 1 deletion ops/build_and_package.sh
Expand Up @@ -14,12 +14,18 @@ then
exit 1
fi

if [ ! -f ../bcda/swaggerui/swagger.json ]
then
echo "Swagger doc generation must be completed prior to creating package."
exit 1
fi

cd ../bcda
go clean
echo "Building bcda binary..."
go build -ldflags "-X main.version=$VERSION"
echo "Packaging bcda binary into RPM..."
fpm -v $VERSION -s dir -t rpm -n bcda bcda=/usr/local/bin/bcda
fpm -v $VERSION -s dir -t rpm -n bcda bcda=/usr/local/bin/bcda swaggerui=/etc/sv/api
cd ../bcdaworker
go clean
echo "Building bcdaworker..."
Expand Down

0 comments on commit c020216

Please sign in to comment.