Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Added CI Script #50

Merged
merged 11 commits into from
Jun 23, 2020
Merged

Conversation

s-ayush2903
Copy link
Contributor

@s-ayush2903 s-ayush2903 commented Jun 20, 2020

Fix #49

Highlights

  • Added google-services.json
  • Moved .idea folder to .gitignore as on running ./gradlew assembleDebug and ./gradlew lintDebug it was making useless changes in repositories folder that falls under .idea
  • Modified few files that were violating linting
  • All the following changes are made for ci/cd in ci file
  • Previously, the docker container was using old SDKs for creating environment inside pipelines
  • The compileSdk version has been upgraded to the one that is being used in the project(29)
  • AndroidBuildTools Version has been upgraded to 29.0.1
  • Latest androidSdkTools(6514223) are being used now in the container for building, linting and testing
  • Made changes in script that are accomodate with the files hierarchy in the current sdk archive
  • (For previous version, i.e., sdk<=28, archive package structure was different and with sdk>=29, it has been updated and so are command for extracting)
  • Added a new Deploy Stage to the script, this job, after completion, deploys the app to appetize.io and saves the url in req.json file.
  • The deploy job is added to test the app online on any Android Flavor
  • The concerned commit also manipulates few core commands that assist in creating environ

@s-ayush2903 s-ayush2903 changed the title Automation CI: Added CI Script Jun 20, 2020
@s-ayush2903
Copy link
Contributor Author

  • It seems that mirroring isn't setup successfully, due to that, pipeline hasn't been triggered yet.
  • Let's change the way we were previously trying to mirror
  • That is a somewhat long process and requires more effort
  • Now, instead of adding repo by url in gitlab, choose the another option connect repo by github.
  • To complete this import successfully, maintainer will have to use a Personal Access Token(if it already exists) and if not exists then it needs to be generated. Without Personal Access Token, connection won't proceed further
  • After that, now select the repository from the list that appears now and click Connect, wait for a while, a green checkmark will appear and 🎉 repo is now connected. All syncs and jobs will be taken care of by pull mirroring

Note: If you generate a new personal access token, then make sure that all the checkboxes are ticked as it defines access of gitlab to the repo and if it fails in accessing something at some point then mirroring will fail again and again and your mailbox will be filled with these kinds of mails. Preferred is to give all permissions to gitlab for a perfect sync(if all permissions are given to gitlab then, it'll automatically upload/update the packages as they are done on github)

References for assistance:

@s-ayush2903
Copy link
Contributor Author

s-ayush2903 commented Jun 20, 2020

@amangrobo Please look into the trailing comment and if the mirroring rule at gitlab is push instead of pull then please do follow the steps mentioned above

As a sidenote, I've setUp the same pipeline procedure that i was intending to do for this repo at my own Fork and the first PR that has its pipeline running on gitlab is this

@s-ayush2903
Copy link
Contributor Author

  • The change made in the last commit is due to deprecation of some methods that are being used for testing in the project.
  • I didn't change them hereby, as this PR already contains a lot of changes to deal with, so this PR is currently completely semantic with CI implementation and it has been successfully implemented.
  • Regarding the new script(for debugTests job) that i put in latest commit:-> This script just runs all the Unit Tests ONLY not the instrumentation ones, whereas the previous one ./gradlew testDebug ran both Unit Tests and Instrumentation Tests.
  • This shouldn't be considered as a flaw in the ci until we ain't writing UI/Instrumentation tests.
  • If needed in future, i'll update the script and replace deprecation methods.

-Thanks!

@s-ayush2903 s-ayush2903 changed the base branch from development to master June 21, 2020 07:09
@s-ayush2903 s-ayush2903 changed the base branch from master to development June 21, 2020 07:14
@amangrobo amangrobo merged commit 4128c35 into Celesta-IITP:development Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants