Skip to content

Commit

Permalink
Add e2e github action
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
  • Loading branch information
ArangoGutierrez committed Feb 20, 2024
1 parent c469c54 commit 72ddc88
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2024 NVIDIA CORPORATION
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: e2e

on:
pull_request:
branches:
- main
- release-*
types:
- labeled
- opened
- synchronize
- closed

jobs:
test:
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') || github.event_name == 'closed' }}

steps:
- uses: actions/checkout@v4
name: Checkout code
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install YQ
run: |
sudo add-apt-repository ppa:rmescandon/yq -y
sudo apt-get update
sudo apt-get install yq -y
yq --version
29 changes: 29 additions & 0 deletions tests/e2e/holodeck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: holodeck.nvidia.com/v1alpha1
kind: Environment
metadata:
name: holodeck
description: "Devel infra environment"
spec:
provider: aws
auth:
keyName: cnt-ci
privateKey: "/Users/eduardoa/.ssh/cnt-ci.pem"
instance:
type: g4dn.xlarge
region: us-west-1
ingressIpRanges:
- 0.0.0.0/0
image:
architecture: amd64
imageId: ami-0ce2cb35386fc22e9
kubernetes:
install: true
installer: kubeadm
version: v1.28.5


# how would a sed command look like to replace the value of the auth.privateKey and auth.keyName fields with some ENV VAR values?

# yq e '.spec.auth.keyName = env(KEY_NAME)' holodeck.yaml
# yq e '.spec.auth.privateKey = env(PRIVATE_KEY)' holodeck.yaml

0 comments on commit 72ddc88

Please sign in to comment.