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

Enhancement/tf smart variables #57

Merged
merged 10 commits into from
May 20, 2022
Merged

Conversation

leihuayi
Copy link
Contributor

No description provided.

@leihuayi leihuayi requested a review from titigmr May 19, 2022 16:06
@leihuayi leihuayi changed the base branch from main to develop May 19, 2022 16:06
@github-actions github-actions bot added the enhancement Improvement of existing code w/o creating new feature label May 19, 2022
type = string
default = "main"
description = "Branch name to deploy"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep branch in tf variable because the deploy.sh script need this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand, I thought the variables for deploy.sh should go in the env.json file ?

Copy link
Contributor

Choose a reason for hiding this comment

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

true! but for this you need to add them into tfvars.json and remove TF_VAR_branch and TF_VAR_app vars

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true I fix this

type = string
default = "latest"
description = "Version to deploy"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

same for app_version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above

Copy link
Contributor

@titigmr titigmr left a comment

Choose a reason for hiding this comment

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

.

@@ -35,9 +35,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build docker image for tests
run: docker build --target test -t basegun-back:tests backend/
run: docker build --target test --build-arg VERSION=1.0 -t basegun-back:tests backend/
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

otherwise the VERSION variable is not defined. Now it's done at build time instead of putting it in the environment at runtime. I changed this a while ago. I forgot to update this test which explains why the CI failed in the previous commits

@leihuayi leihuayi merged commit b705db2 into develop May 20, 2022
@leihuayi leihuayi deleted the enhancement/tf-smart-variables branch May 23, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing code w/o creating new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants