Skip to content

Commit

Permalink
Merge pull request #93 from okta/default-cci-template
Browse files Browse the repository at this point in the history
Add default CCI templates
  • Loading branch information
monde authored Jan 4, 2023
2 parents da2258e + 36f37c8 commit 93264d2
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

orbs:
general-platform-helpers: okta/[email protected]

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
cache-secrets:
machine: true
resource_class: okta/generic-linux-x86
environment:
VAULT_ADDR: https://vault.aue1e.saasure.net
steps:
- checkout
- run:
name: "Vault login"
command: |
vault login -method=userpass username=$vault_username password=$vault_password > /dev/null 2>&1
- general-platform-helpers/save-dependencies

load-secrets:
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
- general-platform-helpers/load-dependencies

test:
docker:
- image: cimg/go:1.19.4
steps:
- checkout
- run: go version
- run:
name: "test stage"
command: make test

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
"Circle CI Tests":
jobs:
- cache-secrets
- load-secrets:
requires:
- cache-secrets
- test:
requires:
- load-secrets

# VS Code Extension Version: 1.4.0
9 changes: 9 additions & 0 deletions .dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
vault:
- USERNAME:
devex/okta-jwt-verifier-golang: USERNAME
- PASSWORD:
devex/okta-jwt-verifier-golang: PASSWORD
- CLIENT_ID:
devex/okta-jwt-verifier-golang: CLIENT_ID
- ISSUER:
devex/okta-jwt-verifier-golang: ISSUER
2 changes: 1 addition & 1 deletion jwtverifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func Test_an_access_token_header_that_is_not_rs256_throws_an_error(t *testing.T)
}

func Test_a_successful_authentication_can_have_its_tokens_parsed(t *testing.T) {
utils.ParseEnvironment()
// utils.ParseEnvironment()

if os.Getenv("ISSUER") == "" || os.Getenv("CLIENT_ID") == "" {
log.Printf("Skipping integration tests")
Expand Down

0 comments on commit 93264d2

Please sign in to comment.