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

Add encoded Android Keystore to GitHub org secrets #14

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

pstankie
Copy link
Contributor

EF issue: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/3998

Signed-off-by: Pawel Stankiewicz <pawel.stankiewicz@eclipse-foundation.org>
@pstankie pstankie requested review from a team as code owners November 29, 2023 07:52
Copy link

Diff for d2c5315:
Printing local diff for configuration at '/home/runner/work/.eclipsefdn/.eclipsefdn/otterdog-configs/otterdog.json'

Actions are indicated with the following symbols:
+   create
!   modify
!   forced update
-   delete

Organization eclipse-kuksa[id=eclipse-kuksa]

+   add org_secret[name="KEYSTORE_RELEASE"] {
+     name                                                     = "KEYSTORE_RELEASE"
+     selected_repositories                                    = []
+     visibility                                               = "public"
+   }

+   add org_secret[name="KEYSTORE_DEBUG"] {
+     name                                                     = "KEYSTORE_DEBUG"
+     selected_repositories                                    = []
+     visibility                                               = "public"
+   }

+   add org_secret[name="SIGNING_STORE_PASSWORD"] {
+     name                                                     = "SIGNING_STORE_PASSWORD"
+     selected_repositories                                    = []
+     visibility                                               = "public"
+   }

+   add org_secret[name="SIGNING_KEY_PASSWORD"] {
+     name                                                     = "SIGNING_KEY_PASSWORD"
+     selected_repositories                                    = []
+     visibility                                               = "public"
+   }

+   add org_secret[name="SIGNING_KEY_ALIAS"] {
+     name                                                     = "SIGNING_KEY_ALIAS"
+     selected_repositories                                    = []
+     visibility                                               = "public"
+   }
  
  Plan: 5 to add, 0 to change, 0 to delete.
Showing diff to a canonical version of the configuration at '/home/runner/work/.eclipsefdn/.eclipsefdn/otterdog-configs/otterdog.json'

Organization eclipse-kuksa[id=eclipse-kuksa]
--- original
+++ canonical
@@ -1,17 +1,22 @@
 local orgs = import 'vendor/otterdog-defaults/otterdog-defaults.libsonnet';
 
+
+local kuksa_default_branch_protection_rule(pattern) =
+  orgs.newBranchProtectionRule(pattern) {
+
+
+        dismisses_stale_reviews: true
+        require_last_push_approval: true
+        required_approving_review_count: 1
+        requires_strict_status_checks: true
+  };
 orgs.newOrg('eclipse-kuksa') {
   _repositories+:: [
     orgs.newRepo('kuksa-actions') {
       allow_merge_commit: true
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('main') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('main')
       ]
       delete_branch_on_merge: false
       dependabot_security_updates_enabled: true
@@ -26,12 +31,7 @@
       allow_squash_merge: false
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('main') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('main')
       ]
       dependabot_security_updates_enabled: true
       web_commit_signoff_required: false
@@ -45,12 +45,7 @@
       allow_squash_merge: false
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('main') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('main')
       ]
       dependabot_security_updates_enabled: true
       web_commit_signoff_required: false
@@ -62,12 +57,7 @@
       allow_merge_commit: true
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('main') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('main')
       ]
       delete_branch_on_merge: false
       dependabot_security_updates_enabled: true
@@ -90,12 +80,7 @@
       allow_merge_commit: true
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('main') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('main')
       ]
       delete_branch_on_merge: false
       dependabot_alerts_enabled: false
@@ -110,12 +95,7 @@
       allow_merge_commit: true
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('main') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('main')
       ]
       delete_branch_on_merge: false
       dependabot_security_updates_enabled: true
@@ -128,12 +108,7 @@
       allow_merge_commit: true
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('main') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('main')
       ]
       delete_branch_on_merge: false
       dependabot_security_updates_enabled: true
@@ -146,12 +121,7 @@
       allow_merge_commit: true
       allow_update_branch: false
       branch_protection_rules: [
-        orgs.newBranchProtectionRule('master') {
-          dismisses_stale_reviews: true
-          require_last_push_approval: true
-          required_approving_review_count: 1
-          requires_strict_status_checks: true
-        }
+        kuksa_default_branch_protection_rule('master')
       ]
       default_branch: "master"
       delete_branch_on_merge: false

@Chrylo
Copy link
Contributor

Chrylo commented Nov 29, 2023

LGTM

@pstankie How was the keystore encoded so I can decode it on our side again? Base64?

@pstankie
Copy link
Contributor Author

Yes, keystores are base64 encoded. Also, it looks like the path is important, so that paths are /tmp/keystore-debug.kts and /tmp/keystore-release.kts
More information in the issue ticket, once this PR is merged and deployed.

@pstankie pstankie merged commit 3e38804 into main Nov 29, 2023
2 checks passed
@pstankie pstankie deleted the android-keystore branch November 29, 2023 10:53
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.

3 participants