From a4e21b8aba10ee74fa3e241d8cb5409d75166fdb Mon Sep 17 00:00:00 2001 From: AkshayJagadish-ne <66637665+AkshayJagadish-ne@users.noreply.github.com> Date: Mon, 5 Oct 2020 23:45:27 -0400 Subject: [PATCH] WIFI-846: Add component version and commit hash to application ping Added job step to add updated commit property file --- .github/workflows/maven-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index b7f17e5..08c2fb3 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -37,6 +37,13 @@ jobs: password: ${{ secrets.MAVEN_REPO_PASSWORD }} - name: Configure maven settings.xml run: cp .github/workflows/maven_settings_template.xml /home/runner/.m2/settings.xml + - name: Updating commit file + run: | + TIMESTAMP=$(date +'%Y-%m-%d') + MVN_VERSION=$(mvn --file wlan-cloud-root/pom.xml -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) + echo date=$TIMESTAMP > wlan-cloud-base/base-container/src/main/resources/commit.properties + echo commitId=$GITHUB_SHA >> wlan-cloud-base/base-container/src/main/resources/commit.properties + echo projectVersion=$MVN_VERSION>> wlan-cloud-base/base-container/src/main/resources/commit.properties - name: Build with Maven - test run: mvn -B --file all-modules-build/pom.xml verify # Ensure all artifacts build successfully before we attempt deploy in order to prevent partial deploys.