-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Reproducible builds #1055
Merged
Merged
Reproducible builds #1055
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
789510f
Simplre reproducible builds
ktecho 85316b7
clone the branch you're reproducing
ktecho c19b6c9
fix branch/tag argument taking + use master as default
ktecho a551eed
be able to execute build.sh more than once
ktecho d6cf6a1
Simplifiying process
ktecho 5f48925
Updating rn-nodeify to 10.3.0 to avoid issue
ktecho e4681cf
Deleting compile and Dockerfile as they're not used anymore
ktecho 754d2c4
Updated simplified build script and README file with instructions to …
ktecho f4029cf
Simplify / beautify build script
ktecho afd1231
Commenting out the singning process for release in build.gradle
ktecho 4d2d497
Build and sign every apk
ktecho a757741
Cut apk location up to current location for easy location of files
ktecho b2af296
Remove signing code
ktecho 6a453f4
Delete unused variables
ktecho 69220ce
Updated instructions
ktecho 7c43d0d
README: update reproducible instructions
kaloudis 347fa29
build.sh: lock in Docker image version
kaloudis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
BUILDER_IMAGE="reactnativecommunity/react-native-android:latest" | ||
CONTAINER_NAME="zeus_builder_container" | ||
ZEUS_PATH=/olympus/zeus | ||
|
||
docker run --rm --name $CONTAINER_NAME -v `pwd`:$ZEUS_PATH $BUILDER_IMAGE bash -c \ | ||
'echo -e "\n\n********************************\n*** Building Zeus...\n********************************\n" && \ | ||
cd /olympus/zeus ; yarn install && \ | ||
cd /olympus/zeus/android ; ./gradlew assembleRelease && \ | ||
|
||
echo -e "\n\n********************************\n**** APKs and MD5\n********************************\n" && \ | ||
cd /olympus/zeus && \ | ||
for f in android/app/build/outputs/apk/release/*.apk; | ||
do | ||
RENAMED_FILENAME=$(echo $f | sed -e "s/app-/zeus-/" | sed -e "s/-release-unsigned//") | ||
mv $f $RENAMED_FILENAME | ||
md5sum $RENAMED_FILENAME | ||
done && \ | ||
echo -e "\n" '; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final steps, we should lock in a version of the build image instead of latest and see if we can build it deterministically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So docker images aren't binaries - they're not deterministic and the hashes also derive from build time
But the good news is I was able to build the images from scratch and get the same outputs for our builds:
Custom image built from reactnativecommunity/react-native-android v5.4 branch:
Built with reactnativecommunity/react-native-android:5.4:
Let's lock in the image here at
5.4
and get this merged in. Will be perfect to use for ourv0.6.6
release.