Skip to content

Commit

Permalink
fix: remove onfail runner from cirlceCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
yinebebt committed Aug 15, 2024
1 parent 438bfd3 commit d336b27
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This config was automatically generated from your source code
# Stacks detected: artifact:go-executable:,cicd:github-actions:.github/workflows,deps:go:.
version: 2.1
jobs:
test-go:
Expand All @@ -13,10 +11,6 @@ jobs:
- run:
name: Download Go modules
command: go mod download
- run:
name: Print go mod help instructions
command: "echo \"go mod download will fail if you have private repositories \nOne way to fix this for private go modules that are hosted in github:\n 1. Add a GITHUB_TOKEN and GITHUB_USER to an org context. Please refer to https://circleci.com/docs/contexts/ for more informaiton on how to use contexts.\n 2. Add a .circleci/config.yml to your repository or use this config.yml as a starting template\n 3. Configure the jobs to use the newly created context which includes GITHUB_TOKEN and GITHUB_USER \n 4. Before downloading the modules you will need to add a step to execute \\\"go env -w GOPRIVATE=github.com/<OrgNameHere>\\\". \n\tThis allows go mod to install private repos under OrgNameHere.\n 5. You will also need to run \\\"git config --global url.\\\"https://$GITHUB_USER:$GITHUB_TOKEN@github.com/<OrgNameHere>/\\\".insteadOf \\\"https://github.com/<OrgNameHere>/\\\"\\\"\n 6. Finally include the \\\"go mod download\\\" it should be able to fetch your private libraries now. \nFor gitlab private go modules, follow the same instructions as above but include your GITLAB_TOKEN and GITLAB_USER.\nThen use gitlab.com instead of github.com in steps 4 and 5.\nSee https://go.dev/ref/mod#private-modules for more details.\""
when: on_fail
- save_cache:
key: go-mod-{{ checksum "go.sum" }}
paths:
Expand All @@ -37,10 +31,6 @@ jobs:
- run:
name: Download Go modules
command: go mod download
- run:
name: Print go mod help instructions
command: "echo \"go mod download will fail if you have private repositories \nOne way to fix this for private go modules that are hosted in github:\n 1. Add a GITHUB_TOKEN and GITHUB_USER to an org context. Please refer to https://circleci.com/docs/contexts/ for more informaiton on how to use contexts.\n 2. Add a .circleci/config.yml to your repository or use this config.yml as a starting template\n 3. Configure the jobs to use the newly created context which includes GITHUB_TOKEN and GITHUB_USER \n 4. Before downloading the modules you will need to add a step to execute \\\"go env -w GOPRIVATE=github.com/<OrgNameHere>\\\". \n\tThis allows go mod to install private repos under OrgNameHere.\n 5. You will also need to run \\\"git config --global url.\\\"https://$GITHUB_USER:$GITHUB_TOKEN@github.com/<OrgNameHere>/\\\".insteadOf \\\"https://github.com/<OrgNameHere>/\\\"\\\"\n 6. Finally include the \\\"go mod download\\\" it should be able to fetch your private libraries now. \nFor gitlab private go modules, follow the same instructions as above but include your GITLAB_TOKEN and GITLAB_USER.\nThen use gitlab.com instead of github.com in steps 4 and 5.\nSee https://go.dev/ref/mod#private-modules for more details.\""
when: on_fail
- save_cache:
key: go-mod-{{ checksum "go.sum" }}
paths:
Expand Down

0 comments on commit d336b27

Please sign in to comment.