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

Finish the CI/CD #39

Closed
16 tasks
akauppi opened this issue Mar 26, 2021 · 4 comments
Closed
16 tasks

Finish the CI/CD #39

akauppi opened this issue Mar 26, 2021 · 4 comments
Assignees
Labels
ci Cloud Build related HOT🔥 Something that should be fixed right now - delaying work!!

Comments

@akauppi
Copy link
Owner

akauppi commented Mar 26, 2021

So that:

  •  pushing (or merging to) master
    • when relevant files in packages/backend have changed,
      •  runs backend tests (if they fail, the push/merge fails)
      • deploys to Firebase
  •  creating a PR targeting master
    • when relevant files in packages/backend have changed,
      •  runs backend tests (if they fail, the PR is marked as "tests fail")
  •  pushing (or merging to) master
    • when relevant files in packages/app have changed,
      •  runs app tests (Cypress) (if they fail, the push/merge fails)
      •  builds a deployable image (if that fails, the push/merge fails)
      • deploys to Firebase
  •  creating a PR targeting master
    • when relevant files in packages/app have changed,
      •  runs app tests (Cypress) (if they fail, the PR is marked as "tests fail")
  •  pushing (or merging to) master
    • when relevant files in packages/app-deploy-ops have changed,
      •  builds a deployable image (if that fails, the push/merge fails)
      • deploys to Firebase
  •  creating a PR targeting master
    • when relevant files in packages/backend have changed,
      •  builds a deployable image (if that fails, the push/merge fails)

Latest error:

$ cd builds
$ $ gcloud builds submit ..
...
Step #4: i  functions: updating Node.js 14 (Beta) function userInfoShadow_2(europe-west6)...
Step #4: ⚠  functions: failed to update function userInfoShadow_2
Step #4: HTTP Error: 403, Missing necessary permission iam.serviceAccounts.actAs for $MEMBER on the service account groundlevel-160221@appspot.gserviceaccount.com.
Step #4: Grant the role 'roles/iam.serviceAccountUser' to $MEMBER on the service account groundlevel-160221@appspot.gserviceaccount.com.
Step #4: You can do that by running 'gcloud iam service-accounts add-iam-policy-binding groundlevel-160221@appspot.gserviceaccount.com --member=$MEMBER --role=roles/iam.serviceAccountUser'.
Step #4: In case the member is a service account please use the prefix 'serviceAccount:' instead of 'user:'.
Step #4: If this is a cross-project service account usage. Ask a project owner to grant you the iam.serviceAccountUser role on the service account and/or set the iam.disableCrossProjectServiceAccountUsage org policy to NOT ENFORCED on the service account project. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.
@akauppi akauppi added the ci Cloud Build related label Mar 26, 2021
@akauppi
Copy link
Owner Author

akauppi commented Mar 26, 2021

Triggers can be made from the CLI: https://cloud.google.com/build/docs/automating-builds/create-manage-triggers

@akauppi akauppi pinned this issue May 24, 2021
@akauppi akauppi self-assigned this May 24, 2021
@akauppi akauppi added the HOT🔥 Something that should be fixed right now - delaying work!! label May 24, 2021
@akauppi
Copy link
Owner Author

akauppi commented May 24, 2021

Changing the spec in the way that:

  • PRs towards master and staging (to be done) are handled; show the status in GitHub
  • Push to master and staging (later) will run tests and deploy the change parts (backend, app, or both) if those tests pass

We cannot prevent direct pushes to a branch. Cloud Build / GitHub integration doesn't allow that.

Related: #50

@akauppi
Copy link
Owner Author

akauppi commented Jun 6, 2021

@akauppi
Copy link
Owner Author

akauppi commented Jun 15, 2021

CI now done enough (see ci/README).

@akauppi akauppi closed this as completed Jun 15, 2021
@akauppi akauppi unpinned this issue Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Cloud Build related HOT🔥 Something that should be fixed right now - delaying work!!
Projects
None yet
Development

No branches or pull requests

1 participant