diff --git a/devops/aws/chart/Chart.yaml b/devops/aws/chart/Chart.yaml index fb8d99b26b40a339ac4037cd4ffc18b74098c396..8205906f52b05d09d671c7543cedcb99037c5889 100644 --- a/devops/aws/chart/Chart.yaml +++ b/devops/aws/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: "os-indexer" -version: 0.1.0 +version: kubeVersion: "v1.21.x-x-x" description: Indexer Helm Chart for Kubernetes type: application diff --git a/provider/indexer-aws/build-aws/buildspec.yaml b/provider/indexer-aws/build-aws/buildspec.yaml index 9a877594a9502dff9b853f711347fd5f81be9069..45269f8416c836e628cafb5e01f83903ce8464b0 100644 --- a/provider/indexer-aws/build-aws/buildspec.yaml +++ b/provider/indexer-aws/build-aws/buildspec.yaml @@ -42,6 +42,7 @@ phases: - echo $JAVA_HOME #WHY - mkdir -p /root/.m2 - cp ./provider/indexer-aws/maven/settings.xml /root/.m2/settings.xml # copy the AWS-specific settings.xml to the CodeBuild instance's .m2 folder + - wget https://github.com/mikefarah/yq/releases/download/v4.27.2/yq_linux_amd64 -q -O /usr/bin/yq && chmod +x /usr/bin/yq - export AWS_ACCOUNT_ID=`aws sts get-caller-identity | grep Account | cut -d':' -f 2 | cut -d'"' -f 2` - export AWS_OSDU_DEV_MAVEN_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain $AWS_OSDU_DEV_MAVEN_DOMAIN --domain-owner $AWS_ACCOUNT_ID --query authorizationToken --output text` pre_build: @@ -61,18 +62,17 @@ phases: - mkdir -p ${OUTPUT_DIR}/bin - mkdir -p ${OUTPUT_DIR}/testing && mkdir -p ${INTEGRATION_TEST_OUTPUT} && mkdir -p ${INTEGRATION_TEST_OUTPUT}/bin - echo "Placeholder" >> ${OUTPUT_DIR}/build-info.json # touched so that the output directory has some content incase the build fails so that testing reports are uploaded + - pom_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + - export VERSION=${pom_version%-*} - printenv - echo "Building primary service assemblies..." - mvn -ntp -B test install sonar:sonar -pl .,indexer-core,provider/indexer-aws -Ddeployment.environment=prod -Dsonar.login=${SONAR_USERNAME} -Dsonar.password=${SONAR_PASSWORD} -Dsonar.branch.name=${BRANCH_NAME} -# - echo "Copying assemblies to dist..." -# - cp ./provider/indexer-aws/target/*spring-boot.jar ${OUTPUT_DIR}/bin # copy aws jars -# - cp ./indexer-core/target/*.jar ${OUTPUT_DIR}/bin # copy core jar - - echo "Building integration testing assemblies and gathering artifacts..." - ./testing/indexer-test-aws/build-aws/prepare-dist.sh + - yq -i '.version = strenv(VERSION)' devops/aws/chart/Chart.yaml - echo "--Copying Helm Charts to ${OUTPUT_DIR:-dist}--" - rsync -r devops/aws/* "${OUTPUT_DIR:-dist}"