Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğecko
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
clients
Ğecko
Commits
72f711f8
Commit
72f711f8
authored
4 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
ci: create job package
parent
c50ae77d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Create CI
Pipeline
#10974
skipped
Stage: package
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+27
-0
27 additions, 0 deletions
.gitlab-ci.yml
release/android/build-apk.sh
+33
-0
33 additions, 0 deletions
release/android/build-apk.sh
with
60 additions
and
0 deletions
.gitlab-ci.yml
+
27
−
0
View file @
72f711f8
...
...
@@ -2,6 +2,7 @@ stages:
-
format
-
build_and_test
-
quality
-
package
.env
:
image
:
axiomteam/gecko-ci:v0.0.5
...
...
@@ -44,3 +45,29 @@ audit_dependencies:
script
:
-
cargo deny -V
-
cargo deny check
releases:test
:
extends
:
.env
stage
:
package
allow_failure
:
true
rules
:
-
if
:
$CI_COMMIT_TAG
when
:
never
-
when
:
manual
script
:
-
bash "release/android/build-apk.sh" "$(date +%Y%m%d).$(date +%H%M).$(date +%S)+0"
artifacts
:
paths
:
&releases_artifacts
-
work/bin/
expire_in
:
72h
releases:x64
:
extends
:
.env
stage
:
package
rules
:
-
if
:
$CI_COMMIT_TAG
script
:
-
bash "release/android/build-apk.sh" "${CI_COMMIT_TAG#v}"
artifacts
:
paths
:
*releases_artifacts
expire_in
:
1 mos
This diff is collapsed.
Click to expand it.
release/android/build-apk.sh
0 → 100755
+
33
−
0
View file @
72f711f8
#!/bin/bash
if
[[
-z
"
${
1
}
"
]]
;
then
echo
"Fatal: no version given to build script"
exit
1
fi
APPNAME
=
"gecko"
VERSION
=
$(
awk
-F
'+'
'{ print $1 }'
<<<
${
1
}
)
BUILD
=
$(
awk
-F
'+'
'{ print $2 }'
<<<
${
1
}
)
ORI_APP
=
"app-release.apk"
APK_FILENAME
=
"
${
APPNAME
}
-
${
VERSION
}
+
${
BUILD
}
.apk"
echo
"artifact name:
${
APK_FILENAME
}
"
## Build Rust dependancies
echo
"Compile Rust binding..."
cargo make
# Build APK
echo
"Build APK..."
flutter clean
flutter build apk
--release
--build-name
$VERSION
--build-number
$BUILD
# Create artifacts folder
ARTIFACTS_FOLDER
=
"work/bin"
mkdir
-p
${
ARTIFACTS_FOLDER
}
# Move APK in artifacts folder
APK_PATH
=
"
${
ARTIFACTS_FOLDER
}
/
${
APK_FILENAME
}
"
mv
build/app/outputs/flutter-apk/
$ORI_APP
"
$APK_PATH
"
||
exit
1
exit
0
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