From 42a41c57c92365b49f1b0bcedca6f48c9963c0c6 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Thu, 8 Sep 2022 08:07:44 -0700 Subject: [PATCH 1/6] Create 1-configure.md --- travis/1-configure.md | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 travis/1-configure.md diff --git a/travis/1-configure.md b/travis/1-configure.md new file mode 100644 index 0000000..5ce59d5 --- /dev/null +++ b/travis/1-configure.md @@ -0,0 +1,62 @@ +# Configure credentials for Valet + +In this lab, you will use the `configure` CLI command to set the required credentials and information for Valet to use when working with Travis CI and GitHub. + +You will need to complete all of the setup instructions [here](./readme.md#configure-your-codespace) prior to performing this lab. + +## Configuring credentials + +1. Create a GitHub Personal Access Token (PAT): + - Open github.com in a new browser tab. + - Click your profile photo in the top right of the UI and click `Settings`. + - Click on `Developer Settings` in the left hand panel. + - Click `Personal Access Tokens` and then `Legacy tokens` (if present). + - Click `Generate new token` and then `Legacy tokens`. You may be required to authenticate with GitHub during this step. + - Select the following scopes: `read:packages` and `workflow`. + - Click `Generate token`. + - Copy the generated PAT and save in a safe location. + +3. Create a Travis CI PAT: + - Log into your Traivs Instance. + - Click on your profile icon in the top right hand corner. You should see a dropdown menu. + - Click on the 'Settings' tab. + - Click on the 'COPY TOKEN' button under the API authentication header and save in a safe location. + +2. Run the `configure` CLI command: + - Select the `TERMINAL` tab from within the codespace terminal window. + - Run the following command: `gh valet configure`. + - Using the down arrow key to highlight `Travis CI`, press the spacebar to select, and then hit enter to continue. + - At the prompt enter your GitHub Username and press enter. + - At the GitHub Container Registry prompt enter the GitHub PAT generated in step 1 and press enter. + - At the GitHub PAT prompt enter the GitHub PAT generated in step 1 and press enter. + - At the GitHub url prompt enter the GitHub instance url or hit enter to accept the default value (`https://github.com`). + - At the Travis CI token prompt enter the Travis CI access token from step 2 and press enter. + - At the Travis CI base url prompt hit enter to accept the default value (`https://Travis CI.com`). + - At the access token to fetch source code in GitHub prompt enter the GitHub PAT generated in step 1 and press enter. + - At the GitHub instance url containing source code prompt press enter to accept the default value (`https://github.com`). + + ![configure-cli-terminal](https://user-images.githubusercontent.com/19557880/189158118-833e46c3-b3f5-49e8-8f20-63d1607b0d8c.png) + +## Verify your environment + +To verify our environment is configured correctly, we are going to run the `update` CLI command. The `update` CLI command will download the latest version of Valet to your codespace. + +1. In the codespace terminal run the following command: + + ```bash + gh valet update + ``` + +2. You should see a confirmation that you were logged into the GitHub Container Registry and Valet was updated to the latest version. + + ```bash + Login Succeeded + latest: Pulling from valet-customers/valet-cli + Digest: sha256:a7d00dee8a37e25da59daeed44b1543f476b00fa2c41c47f48deeaf34a215bbb + Status: Image is up to date for ghcr.io/valet-customers/valet-cli:latest + ghcr.io/valet-customers/valet-cli:latest + ``` + +### Next lab + +[Perform an audit of Travis CI](./2-audit.md) From 474e1dd22fb58791ccd0ce72afaaeaca9f72fd31 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 9 Sep 2022 07:42:58 -0700 Subject: [PATCH 2/6] Update travis/1-configure.md Co-authored-by: j-dunham --- travis/1-configure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/1-configure.md b/travis/1-configure.md index 5ce59d5..4102f93 100644 --- a/travis/1-configure.md +++ b/travis/1-configure.md @@ -17,7 +17,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi - Copy the generated PAT and save in a safe location. 3. Create a Travis CI PAT: - - Log into your Traivs Instance. + - Log into your Travis CI Instance. - Click on your profile icon in the top right hand corner. You should see a dropdown menu. - Click on the 'Settings' tab. - Click on the 'COPY TOKEN' button under the API authentication header and save in a safe location. From f9e6f239c788484d4772d16bca1d18696f4fed60 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 9 Sep 2022 07:46:56 -0700 Subject: [PATCH 3/6] Update travis/1-configure.md --- travis/1-configure.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/travis/1-configure.md b/travis/1-configure.md index 4102f93..8c5dcea 100644 --- a/travis/1-configure.md +++ b/travis/1-configure.md @@ -31,7 +31,8 @@ You will need to complete all of the setup instructions [here](./readme.md#confi - At the GitHub PAT prompt enter the GitHub PAT generated in step 1 and press enter. - At the GitHub url prompt enter the GitHub instance url or hit enter to accept the default value (`https://github.com`). - At the Travis CI token prompt enter the Travis CI access token from step 2 and press enter. - - At the Travis CI base url prompt hit enter to accept the default value (`https://Travis CI.com`). + - At the Travis CI base url prompt hit enter to accept the default value (`https://travis-ci.com`). + - At the Travis CI organization name enter `valet-travis-labs`. - At the access token to fetch source code in GitHub prompt enter the GitHub PAT generated in step 1 and press enter. - At the GitHub instance url containing source code prompt press enter to accept the default value (`https://github.com`). From d6a21442160d6ed90e241d914f08c94d90a2aede Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Tue, 13 Sep 2022 16:39:20 -0700 Subject: [PATCH 4/6] Update travis/1-configure.md Co-authored-by: Ethan Dennis --- travis/1-configure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/1-configure.md b/travis/1-configure.md index 8c5dcea..db2bf40 100644 --- a/travis/1-configure.md +++ b/travis/1-configure.md @@ -17,7 +17,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi - Copy the generated PAT and save in a safe location. 3. Create a Travis CI PAT: - - Log into your Travis CI Instance. + - Open Travis CI in a new browser tab. - Click on your profile icon in the top right hand corner. You should see a dropdown menu. - Click on the 'Settings' tab. - Click on the 'COPY TOKEN' button under the API authentication header and save in a safe location. From 603af0f056f3351d9fcc16c02115b7510a160aa6 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Tue, 13 Sep 2022 16:39:31 -0700 Subject: [PATCH 5/6] Update travis/1-configure.md Co-authored-by: Ethan Dennis --- travis/1-configure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/1-configure.md b/travis/1-configure.md index db2bf40..ae61fd2 100644 --- a/travis/1-configure.md +++ b/travis/1-configure.md @@ -18,7 +18,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi 3. Create a Travis CI PAT: - Open Travis CI in a new browser tab. - - Click on your profile icon in the top right hand corner. You should see a dropdown menu. + - Click on your profile icon in the top right hand corner to reveal a dropdown menu. - Click on the 'Settings' tab. - Click on the 'COPY TOKEN' button under the API authentication header and save in a safe location. From 9a4c81c71385923b1572c34e0f4caf72340dddc9 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Tue, 13 Sep 2022 16:39:36 -0700 Subject: [PATCH 6/6] Update travis/1-configure.md Co-authored-by: Ethan Dennis --- travis/1-configure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/1-configure.md b/travis/1-configure.md index ae61fd2..6410274 100644 --- a/travis/1-configure.md +++ b/travis/1-configure.md @@ -20,7 +20,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi - Open Travis CI in a new browser tab. - Click on your profile icon in the top right hand corner to reveal a dropdown menu. - Click on the 'Settings' tab. - - Click on the 'COPY TOKEN' button under the API authentication header and save in a safe location. + - Click on the 'COPY TOKEN' button under "API authentication header" and save in a safe location. 2. Run the `configure` CLI command: - Select the `TERMINAL` tab from within the codespace terminal window.