Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/workflows/pipeline-deploy-to-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
build-internal-aab:
uses: ./.github/workflows/reusable-build-apk.yml
secrets: inherit
needs: get-version
with:
build-environment: internal
build-environment: Internal
version-name: ${{ needs.get-version.outputs.version-name }}

run-app-sweep:
Expand All @@ -28,21 +29,10 @@ jobs:

deploy-internal-build:
uses: ./.github/workflows/reusable-promote-artifact.yml
secrets: inherit
with:
deployment-track: internal
upload-artifact: ${{ needs.build-internal-aab.outputs.build-artifact }}
mapping-file: ${{ needs.build-internal-aab.outputs.optional-mapping-file }}
needs:
- build-internal-aab
- run-app-sweep

deploy-alpha-build:
uses: ./.github/workflows/reusable-promote-artifact.yml
with:
deployment-track: alpha
deployment-track: Internal
upload-artifact: ${{ needs.build-internal-aab.outputs.build-artifact }}
mapping-file: ${{ needs.build-internal-aab.outputs.optional-mapping-file }}
needs:
- build-internal-aab
- run-app-sweep
- deploy-internal-build
5 changes: 3 additions & 2 deletions .github/workflows/pipeline-deploy-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
build-staging-apk:
uses: ./.github/workflows/reusable-build-apk.yml
secrets: inherit
needs: get-version
with:
build-environment: staging
build-environment: Staging
version-name: ${{ needs.get-version.outputs.version-name }}

deploy-to-firebase:
Expand All @@ -23,5 +24,5 @@ jobs:
needs:
- build-staging-apk
with:
build-environment: staging
build-environment: Staging
upload-artifact: ${{ needs.build-staging-apk.outputs.build-artifact }}
2 changes: 1 addition & 1 deletion .github/workflows/reusable-app-sweep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: App Sweep Security Scan
runs-on: ubuntu-latest
timeout-minutes: ${{ fromJSON(vars.JOB_TIMEOUT_MINUTES) }}
environment: internal
environment: Internal

steps:
- name: Download AAB artifact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
console_url="$(echo "$output" | grep -o 'https://console\.firebase\.google\.com[^[:space:]]*')"

# Expose console_url as a step output using $GITHUB_OUTPUT
echo "console_url=$console_url" >> "$GITHUB_OUTPUT"
echo "console_url=$console_url" >> $GITHUB_OUTPUT

- name: Distribution Summary
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-get-version-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
if [ "${{ inputs.version-source }}" = "branch" ]; then
last_part="${GITHUB_REF_NAME##*/}"
echo "version-name=$last_part" >> "$GITHUB_OUTPUT"
echo "version-name=$last_part" >> $GITHUB_OUTPUT
elif [ "${{ inputs.version-source }}" = "internal" ]; then
VERSION_NAME=$(grep 'set("VERSION_NAME"' build-logic/build_properties.gradle.kts \
| sed -E 's/.*set\("VERSION_NAME",[[:space:]]*"([^"]+)".*/\1/')
Expand Down
72 changes: 42 additions & 30 deletions .github/workflows/reusable-promote-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,47 @@ jobs:

- name: Set vars
run: |
if [ "${{inputs.deployment-track}}" == "Internal" ]; then
STATUS="completed"
USER_FRACTION=1.0
TRACK="qa"
elif [ "${{inputs.deployment-track}}" == "Alpha" ]; then
STATUS="completed"
USER_FRACTION=1.0
TRACK="alpha"
elif [ "${{inputs.deployment-track}}" == "Prod-25-Percent-Rollout" ]; then
STATUS="inProgress"
USER_FRACTION=0.25
TRACK="production"
elif [ "${{inputs.deployment-track}}" == "Prod-50-Percent-Rollout" ]; then
STATUS="inProgress"
USER_FRACTION=0.5
TRACK="production"
elif [ "${{inputs.deployment-track}}" == "Prod-100-Percent-Rollout" ]; then
STATUS="completed"
USER_FRACTION=1.0
TRACK="production"
if [ "${{ inputs.deployment-track }}" == "Internal" ]; then
echo "STATUS=completed" >> $GITHUB_ENV
echo "USER_FRACTION=1.0" >> $GITHUB_ENV
echo "TRACK=internal" >> $GITHUB_ENV
elif [ "${{ inputs.deployment-track }}" == "Alpha" ]; then
echo "STATUS=completed" >> $GITHUB_ENV
echo "USER_FRACTION=1.0" >> $GITHUB_ENV
echo "TRACK=alpha" >> $GITHUB_ENV
elif [ "${{ inputs.deployment-track }}" == "Prod-25-Percent-Rollout" ]; then
echo "STATUS=inProgress" >> $GITHUB_ENV
echo "USER_FRACTION=0.25" >> $GITHUB_ENV
echo "TRACK=production" >> $GITHUB_ENV
elif [ "${{ inputs.deployment-track }}" == "Prod-50-Percent-Rollout" ]; then
echo "STATUS=inProgress" >> $GITHUB_ENV
echo "USER_FRACTION=0.5" >> $GITHUB_ENV
echo "TRACK=production" >> $GITHUB_ENV
elif [ "${{ inputs.deployment-track }}" == "Prod-100-Percent-Rollout" ]; then
echo "STATUS=completed" >> $GITHUB_ENV
echo "USER_FRACTION=1.0" >> $GITHUB_ENV
echo "TRACK=production" >> $GITHUB_ENV
fi

- name: Publish app to track
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{secrets.GOOGLE_API_KEY_JSON}}
packageName: com.simprints.id
releaseFiles: ${{ inputs.upload-artifact }}
track: $TRACK
status: $STATUS
userFraction: $USER_FRACTION
mappingFile: ${{ inputs.mapping-file }}

- name: Publish app (Completed Release)
if: env.STATUS == 'completed'
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_API_KEY_JSON }}
packageName: com.simprints.id
releaseFiles: ${{ inputs.upload-artifact }}
track: ${{ env.TRACK }}
mappingFile: ${{ inputs.mapping-file }}

- name: Publish app (Rollout Release)
if: env.STATUS == 'inProgress'
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_API_KEY_JSON }}
packageName: com.simprints.id
releaseFiles: ${{ inputs.upload-artifact }}
track: ${{ env.TRACK }}
status: ${{ env.STATUS }}
userFraction: ${{ env.USER_FRACTION }}
mappingFile: ${{ inputs.mapping-file }}
9 changes: 8 additions & 1 deletion .github/workflows/reusable-sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,11 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew sonar -Dsonar.qualitygate.wait=true -Dsonar.qualitygate.timeout=3600 --info
# Check if the event is a pull request
if [ "${{ github.event_name }}" == "pull_request" ]; then
# Run SonarQube scan without branch name param as sonarqube will detect PR branch
./gradlew sonar -Dsonar.qualitygate.wait=true -Dsonar.qualitygate.timeout=3600 --info
else
# Run SonarQube scan with branch name param
./gradlew sonar -Dsonar.qualitygate.wait=true -Dsonar.qualitygate.timeout=3600 -Dsonar.branch.name=${{ github.ref_name }} --info
fi
2 changes: 1 addition & 1 deletion build-logic/build_properties.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extra.apply {
* Dev version >= 2024.2.2 is required for float quality thresholds
* Dev version >= 2024.3.0 is required to receive configuration ID
*/
set("VERSION_NAME", "2024.3.0")
set("VERSION_NAME", "2025.1.0")

/**
* Build type. The version code describes which build type was used for the build.
Expand Down