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 Harbor Migration Script #1806

Merged
merged 3 commits into from
Apr 30, 2020
Merged

Add Harbor Migration Script #1806

merged 3 commits into from
Apr 30, 2020

Conversation

cdchris12
Copy link
Contributor

This PR adds a script which can be used to create Harbor projects, create Harbor robot accounts, and add the corresponding environment variables to a project which does not currently have a Harbor project associated with it.

Checklist

  • PR title is ready for changelog and subsystem label(s) applied

@cdchris12 cdchris12 added the 2-build-deploy Build & Deploy subsystem label Apr 21, 2020
@cdchris12 cdchris12 added this to the v1.5.0 milestone Apr 21, 2020
@cdchris12 cdchris12 self-assigned this Apr 21, 2020
// Get project's env vars
var envVars = await query(sqlClient, `SELECT * FROM env_vars WHERE project='${project.id}';`);
var hasVars = false;
if (envVars != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this specific condition? Our sql library is weird and I don't remember if returning 0 results actually returns null or if the != is coercing the actual result (I think an object?) to null and so it's true by accident.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch; this was an artifact from my earlier testing attempts. I removed this logic, and the script still functions as intended.

@Schnitzel Schnitzel merged commit e253a4e into master Apr 30, 2020
@cdchris12 cdchris12 deleted the add_harbor_migration branch July 1, 2020 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2-build-deploy Build & Deploy subsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants