-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/1003 add container scans (#103)
* Add anchore image scanning, update circleci config * Fix config.yml validity issues * Bump package version, ensure latest deps are installed
- Loading branch information
Showing
4 changed files
with
235 additions
and
242 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
set -o nounset | ||
|
||
|
||
if [[ ${CIRCLE_TAG} =~ v[0-9]+(\.[0-9]+)*(\-snapshot) ]]; then | ||
echo "Setting snap shot env vars for ${CIRCLE_TAG}" | ||
|
||
echo 'export RELEASE_TAG=$RELEASE_TAG_SNAPSHOT' >> $BASH_ENV | ||
echo 'export HELM_VALUE_FILENAME=$K8_HELM_VALUE_FILENAME_SNAPSHOT' >> $BASH_ENV | ||
echo 'export K8_CLUSTER_SERVER=$K8_CLUSTER_SERVER_SNAPSHOT' >> $BASH_ENV | ||
echo 'export K8_RELEASE_NAME=$K8_RELEASE_NAME_SNAPSHOT' >> $BASH_ENV | ||
echo 'export K8_NAMESPACE=$K8_NAMESPACE_SNAPSHOT' >> $BASH_ENV | ||
echo 'export K8_USER_NAME=$K8_USER_NAME_SNAPSHOT' >> $BASH_ENV | ||
echo 'export K8_USER_TOKEN=$K8_USER_TOKEN_SNAPSHOT' >> $BASH_ENV | ||
echo 'export K8_HELM_CHART_NAME=$K8_HELM_CHART_NAME_SNAPSHOT' >> $BASH_ENV | ||
echo 'export K8_HELM_CHART_VERSION=$K8_HELM_CHART_VERSION_SNAPSHOT' >> $BASH_ENV | ||
echo 'export HELM_VALUE_SET_VALUES="--set central.centralhub.centralledger.containers.api.image.repository=$DOCKER_ORG/$CIRCLE_PROJECT_REPONAME --set central.centralhub.centralledger.containers.api.image.tag=$CIRCLE_TAG --set central.centralhub.centralledger.containers.admin.image.repository=$DOCKER_ORG/$CIRCLE_PROJECT_REPONAME --set central.centralhub.centralledger.containers.admin.image.tag=$CIRCLE_TAG"' >> $BASH_ENV | ||
|
||
exit 0 | ||
fi | ||
|
||
if [[ ${CIRCLE_TAG} =~ v[0-9]+(\.[0-9]+)*(\-hotfix) ]]; then | ||
echo "Setting hotfix env vars for ${CIRCLE_TAG}" | ||
|
||
echo 'export RELEASE_TAG=$RELEASE_TAG_PROD' >> $BASH_ENV | ||
exit 0 | ||
fi | ||
|
||
if [[ ${CIRCLE_TAG} =~ v[0-9]+(\.[0-9]+)* ]]; then | ||
echo "Setting prod env vars for ${CIRCLE_TAG}" | ||
|
||
echo 'export RELEASE_TAG=$RELEASE_TAG_PROD' >> $BASH_ENV | ||
echo 'export HELM_VALUE_FILENAME=$K8_HELM_VALUE_FILENAME_PROD' >> $BASH_ENV | ||
echo 'export K8_CLUSTER_SERVER=$K8_CLUSTER_SERVER_PROD' >> $BASH_ENV | ||
echo 'export K8_RELEASE_NAME=$K8_RELEASE_NAME_PROD' >> $BASH_ENV | ||
echo 'export K8_NAMESPACE=$K8_NAMESPACE_PROD' >> $BASH_ENV | ||
echo 'export K8_USER_NAME=$K8_USER_NAME_PROD' >> $BASH_ENV | ||
echo 'export K8_USER_TOKEN=$K8_USER_TOKEN_PROD' >> $BASH_ENV | ||
echo 'export K8_HELM_CHART_NAME=$K8_HELM_CHART_NAME_PROD' >> $BASH_ENV | ||
echo 'export K8_HELM_CHART_VERSION=$K8_HELM_CHART_VERSION_PROD' >> $BASH_ENV | ||
echo 'export HELM_VALUE_SET_VALUES="--set central.centralhub.centralledger.containers.api.image.repository=$DOCKER_ORG/$CIRCLE_PROJECT_REPONAME --set central.centralhub.centralledger.containers.api.image.tag=$CIRCLE_TAG --set central.centralhub.centralledger.containers.admin.image.repository=$DOCKER_ORG/$CIRCLE_PROJECT_REPONAME --set central.centralhub.centralledger.containers.admin.image.tag=$CIRCLE_TAG"' >> $BASH_ENV | ||
|
||
exit 0 | ||
fi | ||
|
||
echo "No valid match found for CIRCLE_TAG: ${CIRCLE_TAG}" | ||
exit 1 |
Oops, something went wrong.