Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.sudoku
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
android
org.benoitharrault.sudoku
Commits
6820ba03
Commit
6820ba03
authored
3 years ago
by
Benoît Harrault
Browse files
Options
Downloads
Plain Diff
Merge branch '22-improve-ci-cd-create-tag-on-new-release-step' into 'master'
Resolve "Improve CI/CD, create tag on new release step" Closes
#22
See merge request
!18
parents
a750933e
89cbfa7d
Branches
Branches containing commit
Tags
Release_0.0.16_16
Tags containing commit
1 merge request
!18
Resolve "Improve CI/CD, create tag on new release step"
Pipeline
#1514
canceled
3 years ago
Stage: update
Stage: build-debug
Changes
2
Pipelines
4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+32
-2
32 additions, 2 deletions
.gitlab-ci.yml
android/gradle.properties
+2
-2
2 additions, 2 deletions
android/gradle.properties
with
34 additions
and
4 deletions
.gitlab-ci.yml
+
32
−
2
View file @
6820ba03
...
...
@@ -4,10 +4,13 @@ stages:
-
update
-
build-debug
-
build-release
-
release
-
deploy
update
:
stage
:
update
except
:
-
tags
script
:
-
flutter packages get
-
flutter packages upgrade
...
...
@@ -15,6 +18,8 @@ update:
android:build-debug
:
stage
:
build-debug
except
:
-
tags
script
:
# Flutter local configuration
-
echo flutter.sdk=$FLUTTER_PATH > android/local.properties
...
...
@@ -42,6 +47,8 @@ android:build-release:
stage
:
build-release
only
:
-
master
except
:
-
tags
dependencies
:
-
android:build-debug
script
:
...
...
@@ -67,11 +74,34 @@ android:build-release:
expire_in
:
1 week
interruptible
:
true
android:deploy
:
stage
:
deploy
application:release
:
stage
:
release
image
:
name
:
alpine/git
entrypoint
:
[
"
"
]
only
:
-
master
except
:
-
tags
dependencies
:
-
android:build-release
script
:
-
git config user.email "${GITLAB_USER_EMAIL}"
-
git config user.name "${GITLAB_USER_NAME}"
-
git remote set-url origin https://oauth2:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}
-
VERSION_FILE="$(find . -name 'gradle.properties' | head -n1)"
-
VERSION_NAME="$(grep '^app.versionName=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
-
echo "${TAG_NAME}"
-
git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME} (${VERSION_CODE})"
-
git push origin "${TAG_NAME}"
android:deploy
:
stage
:
deploy
only
:
-
tags
dependencies
:
-
application:release
script
:
-
wget ${REPOSITORY_UPDATE_WEBHOOK}?token=${REPOSITORY_TOKEN}
This diff is collapsed.
Click to expand it.
android/gradle.properties
+
2
−
2
View file @
6820ba03
org.gradle.jvmargs
=
-Xmx1536M
android.useAndroidX
=
true
android.enableJetifier
=
true
app.versionName
=
0.0.1
5
app.versionCode
=
1
5
app.versionName
=
0.0.1
6
app.versionCode
=
1
6
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment