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

Updated nightwatch workflow inputs and added Estuary app to trigger workflow #1319

Merged
merged 7 commits into from
Oct 13, 2023

Conversation

MarkCalvert
Copy link
Contributor

@MarkCalvert MarkCalvert commented Oct 10, 2023

Changed

  1. Updated the nightwatch workflow input names to match what the estuary API expects to send to the GitHub workflows.
    https://github.com/dpc-sdp/estuary/blob/79da49c5866435436a14795c288fc8a9a2cceaa4/pkg/github/server.go#L53
  2. Removed E2E input and logic
  3. Updated trigger-e2e.sh script to use the Estuary app to trigger e2e testing.

@MarkCalvert MarkCalvert changed the title Updated nightwatch workflow input names Updated nightwatch workflow inputs and added Estuary app to trigger workflow Oct 11, 2023
@MarkCalvert
Copy link
Contributor Author

Hey @FleetAdmiralButter @tim-yao ,
I successfully triggered the e2e tests via estuary on a Lagoon Build.
https://dashboard.amazeeio.cloud/projects/ripple/ripple-pr-1319/deployments/lagoon-build-uazonj
https://github.com/dpc-sdp/ripple/actions/runs/6488552014.
For testing, I have added two env variables to the project using Lagoon CLI E2E_ESTUARY_URL & E2E_ESTUARY_TOKEN_PATH.
I believe these are managed somewhere else for SDP?

@tim-yao
Copy link
Contributor

tim-yao commented Oct 11, 2023

Hey @FleetAdmiralButter @tim-yao , I successfully triggered the e2e tests via estuary on a Lagoon Build. https://dashboard.amazeeio.cloud/projects/ripple/ripple-pr-1319/deployments/lagoon-build-uazonj https://github.com/dpc-sdp/ripple/actions/runs/6488552014. For testing, I have added two env variables to the project using Lagoon CLI E2E_ESTUARY_URL & E2E_ESTUARY_TOKEN_PATH. I believe these are managed somewhere else for SDP?

I can see the triggered action. So I guess it's working as expected? For the two new vars, @FleetAdmiralButter do you have any suggestion?

@FleetAdmiralButter
Copy link
Contributor

FleetAdmiralButter commented Oct 12, 2023

Hi @tim-yao @MarkCalvert, since E2E_ESTUARY_URL and E2E_ESTUARY_TOKEN_PATH are consumed by a script in the Lagoon project itself, it should be configured in CMDB as a build-time variable.

Though I don't think we need to configure E2E_ESTUARY_TOKEN_PATH - the path to the service account token will always be in /run/secrets/kubernetes.io/serviceaccount/token.

@tim-yao
Copy link
Contributor

tim-yao commented Oct 12, 2023

Hi @tim-yao @MarkCalvert, since E2E_ESTUARY_URL and E2E_ESTUARY_TOKEN_PATH are consumed by a script in the Lagoon project itself, it should be configured in CMDB as a build-time variable.

Though I don't think we need to configure E2E_ESTUARY_TOKEN_PATH - the path to the service account token will always be in /run/secrets/kubernetes.io/serviceaccount/token.

I support fewer vars, it can reduce the maintenance work but it's up to you guys to decide.

tim-yao
tim-yao previously approved these changes Oct 12, 2023
@MarkCalvert
Copy link
Contributor Author

Hi @tim-yao @MarkCalvert, since E2E_ESTUARY_URL and E2E_ESTUARY_TOKEN_PATH are consumed by a script in the Lagoon project itself, it should be configured in CMDB as a build-time variable.
Though I don't think we need to configure E2E_ESTUARY_TOKEN_PATH - the path to the service account token will always be in /run/secrets/kubernetes.io/serviceaccount/token.

I support fewer vars, it can reduce the maintenance work but it's up to you guys to decide.

@tim-yao @FleetAdmiralButter I don't have access to CMDB, so can one of you add the variables?
I added the token path as an env variable for security reasons because this repo is public.
However, we would have to delete the commits and this PR somehow....

@tim-yao
Copy link
Contributor

tim-yao commented Oct 12, 2023

@FleetAdmiralButter @MarkCalvert I would like to change the workflow name to e2e instead of nightwatch later. Like https://github.com/dpc-sdp/fvrim-vic-gov-au/pull/103/files.
It can be another PR, so no change is required in this PR. Thanks!

@tim-yao
Copy link
Contributor

tim-yao commented Oct 12, 2023

Hi @tim-yao @MarkCalvert, since E2E_ESTUARY_URL and E2E_ESTUARY_TOKEN_PATH are consumed by a script in the Lagoon project itself, it should be configured in CMDB as a build-time variable.
Though I don't think we need to configure E2E_ESTUARY_TOKEN_PATH - the path to the service account token will always be in /run/secrets/kubernetes.io/serviceaccount/token.

I support fewer vars, it can reduce the maintenance work but it's up to you guys to decide.

@tim-yao @FleetAdmiralButter I don't have access to CMDB, so can one of you add the variables? I added the token path as an env variable for security reasons because this repo is public. However, we would have to delete the commits and this PR somehow....

@FleetAdmiralButter It will need to be implemented into existing projects and new project templates. I am not sure what's the best way to do it now. Can you help on this? Thanks!

@FleetAdmiralButter
Copy link
Contributor

@MarkCalvert The path to the service account token (/run/secrets/kubernetes.io/serviceaccount/token) is a standard path in Kubernetes, so technically that information is public already.

Could we set default values in the script? Like:

E2E_ESTUARY_URL="${E2E_ESTUARY_URL:-http://estuary.sdp-services/}"
E2E_ESTUARY_TOKEN_PATH ="${E2E_ESTUARY_TOKEN_PATH:-/run/secrets/kubernetes.io/serviceaccount/token}"

@MarkCalvert
Copy link
Contributor Author

@MarkCalvert The path to the service account token (/run/secrets/kubernetes.io/serviceaccount/token) is a standard path in Kubernetes, so technically that information is public already.

Could we set default values in the script? Like:

E2E_ESTUARY_URL="${E2E_ESTUARY_URL:-http://estuary.sdp-services/}"
E2E_ESTUARY_TOKEN_PATH ="${E2E_ESTUARY_TOKEN_PATH:-/run/secrets/kubernetes.io/serviceaccount/token}"

@FleetAdmiralButter Ahh I see, good to know.
Yes we can set the default values like that.

@MarkCalvert
Copy link
Contributor Author

Removed the env variables using Lagoon CLI and added default values in the script.
E2E workflow was triggered on lagoon build
https://github.com/dpc-sdp/ripple/actions/runs/6491017510

@MarkCalvert MarkCalvert requested a review from tim-yao October 12, 2023 20:26
@MarkCalvert MarkCalvert merged commit 8a007f7 into develop Oct 13, 2023
@MarkCalvert MarkCalvert deleted the feature/update-nightwatch-input-names branch October 13, 2023 01:13
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