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

Adding GitHub token into all env files #2863

Merged
merged 1 commit into from Feb 17, 2022
Merged

Conversation

TDDR
Copy link
Contributor

@TDDR TDDR commented Feb 9, 2022

Issue This PR Addresses

Fixes #2799

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

This is my attempt at getting the ball rolling for issue #2799.

From what I can tell, adding the GITHUB_TOKEN= to the env.example will auto-populate the GitHub token.

I then expose that token in the Docker-compose by adding it to the top level environment

The thing I am least certain of is my attempt to use the token in the deploy.sh file. I am fairly sure that is wrong, but I'm not sure what exactly needs to happen, or how to test it.

Steps to test the PR

@manekenpix had to take down staging in order to test this.

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@TDDR TDDR added type: enhancement New feature or request help wanted Extra attention is needed area: docker area: microservices labels Feb 9, 2022
@TDDR TDDR self-assigned this Feb 9, 2022
@gitpod-io
Copy link

gitpod-io bot commented Feb 9, 2022

@@ -34,7 +34,7 @@ fi
echo "GIT_COMMIT=$2" >> $ENV_FILE

echo "Building $ENV Container"
docker-compose --env-file $ENV_FILE --project-name=$ENV build
GITHUB_TOKEN={$GITHUB_TOKEN} docker-compose --env-file $ENV_FILE --project-name=$ENV build
Copy link
Contributor

Choose a reason for hiding this comment

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

is there anyway we can see the value of GITHUB_TOKEN here?

Copy link
Contributor

Choose a reason for hiding this comment

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

It would have to be set outside the script. @manekenpix can speak to what's possible in the env of the build machines.

Copy link
Member

Choose a reason for hiding this comment

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

I think it should be set in here so the autodeployment server can see it, and then passed into the script.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, you already did, the only step left is passing it to the script here

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it belongs in this PR, but we could also document this change in our docs

@TDDR
Copy link
Contributor Author

TDDR commented Feb 10, 2022

I made some changes. Still not sure how to test this out?

@manekenpix
Copy link
Member

manekenpix commented Feb 10, 2022

@TDDR Ping me on slack for testing your PR on staging when it's ready.

@TDDR
Copy link
Contributor Author

TDDR commented Feb 16, 2022

I somehow deleted the previous two commits I had originally shared when I did a rebase -i. I think I have things back to where they were.

@TDDR TDDR marked this pull request as ready for review February 16, 2022 01:50
@TDDR TDDR requested a review from tcvan0707 February 16, 2022 01:50
tcvan0707
tcvan0707 previously approved these changes Feb 16, 2022
manekenpix
manekenpix previously approved these changes Feb 16, 2022
Copy link
Member

@manekenpix manekenpix left a comment

Choose a reason for hiding this comment

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

LGTM 👍
We'll have to update the docs to reflect these changes, here or in a different PR.

humphd
humphd previously approved these changes Feb 16, 2022
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Nice work on this. I know it wasn't easy to test. I appreciate you all sticking with it and getting it done.

@TueeNguyen
Copy link
Contributor

@TDDR, let's rebase this and ping the Sheriffs after

Kevan-Y
Kevan-Y previously approved these changes Feb 16, 2022
@TDDR TDDR merged commit 0723bb9 into Seneca-CDOT:master Feb 17, 2022
@humphd
Copy link
Contributor

humphd commented Feb 17, 2022

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docker area: microservices help wanted Extra attention is needed type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use GITHUB_TOKEN env var in status service docker setup
7 participants