Skip to content

Commit 593058e

Browse files
authored
fix: resolve variable problems in nix shell (rancher#141)
Signed-off-by: matttrach <matt.trachier@suse.com>
1 parent 99bff0d commit 593058e

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

.github/workflows/release.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,16 @@ jobs:
104104
AWS_ACCESS_KEY_ID: ${{ steps.aws-creds.outputs.aws-access-key-id }}
105105
AWS_SECRET_ACCESS_KEY: ${{ steps.aws-creds.outputs.aws-secret-access-key }}
106106
AWS_SESSION_TOKEN: ${{ steps.aws-creds.outputs.aws-session-token }}
107-
AWS_MAX_ATTEMPTS: 100
108-
AWS_RETRY_MODE: adaptive
109107
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
110-
GITHUB_OWNER: rancher
111-
IDENTIFIER: ${{github.run_id}}
112108
ZONE: ${{secrets.ZONE}}
113-
ACME_SERVER_URL: https://acme-v02.api.letsencrypt.org/directory
114-
RANCHER_INSECURE: false
109+
IDENTIFIER: ${{github.run_id}}
115110
run: |
111+
# nix ignores environment variables that are not specifically kept
112+
export AWS_MAX_ATTEMPTS="100"
113+
export AWS_RETRY_MODE="adaptive"
114+
export GITHUB_OWNER="rancher"
115+
export ACME_SERVER_URL="https://acme-v02.api.letsencrypt.org/directory"
116+
export RANCHER_INSECURE="false"
116117
./run_tests.sh -s
117118
118119
cleanup:
@@ -146,9 +147,9 @@ jobs:
146147
AWS_ACCESS_KEY_ID: ${{ steps.aws-creds.outputs.aws-access-key-id }}
147148
AWS_SECRET_ACCESS_KEY: ${{ steps.aws-creds.outputs.aws-secret-access-key }}
148149
AWS_SESSION_TOKEN: ${{ steps.aws-creds.outputs.aws-session-token }}
149-
AWS_MAX_ATTEMPTS: 100
150150
IDENTIFIER: ${{github.run_id}}
151151
run: |
152+
export AWS_MAX_ATTEMPTS="100"
152153
./run_tests.sh -c $IDENTIFIER
153154
154155
report:

examples/downstream/variables.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ variable "rancher_version" {
4343
description = <<-EOT
4444
The version of rancher to install on the rke2 cluster.
4545
EOT
46-
default = "2.9.1"
4746
}
4847
variable "file_path" {
4948
type = string
@@ -58,15 +57,13 @@ variable "acme_server_url" {
5857
The ACME server URL to use for cert-manager.
5958
This is useful for using the Let's Encrypt staging server for testing.
6059
EOT
61-
default = "https://acme-staging-v02.api.letsencrypt.org/directory"
6260
}
6361
variable "runner_ip" {
6462
type = string
6563
description = <<-EOT
6664
The IP of the sever running Terraform.
6765
Only this IP will have access to the cluster.
6866
EOT
69-
default = ""
7067
}
7168
variable "aws_access_key_id" {
7269
type = string

test/tests/util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ func SetAcmeServer(t *testing.T) string {
394394
acmeserver := os.Getenv("ACME_SERVER_URL")
395395
if acmeserver == "" {
396396
os.Setenv("ACME_SERVER_URL", "https://acme-staging-v02.api.letsencrypt.org/directory") //nolint usetesting
397+
acmeserver = "https://acme-staging-v02.api.letsencrypt.org/directory"
397398
}
398399
return acmeserver
399400
}

0 commit comments

Comments
 (0)