Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 20 additions & 65 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,12 @@ jobs:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: -v --timeout 5m
skip-cache: true
- name: Setup JFrog CLI
id: jfrog
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: https://${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}/
with:
oidc-provider-name: nvgithub
oidc-audience: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
- name: Setup Go Proxy
id: setup-go-proxy
uses: nv-gha-runners/setup-artifactory-go-proxy@main
- env:
OIDC_USER: ${{ steps.jfrog.outputs.oidc-user }}
OIDC_TOKEN: ${{ steps.jfrog.outputs.oidc-token }}
OIDC_ARTIFACTORY_ENDPOINT: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
GOPROXY: ${{ steps.setup-go-proxy.outputs.goproxy-url }}
run: |
OIDC_USER_ENCODED=$(python3 -c 'import urllib.parse, os; print(urllib.parse.quote_plus(os.environ["OIDC_USER"]))')
export GOPROXY="https://${OIDC_USER_ENCODED}:${OIDC_TOKEN}@${OIDC_ARTIFACTORY_ENDPOINT}/artifactory/api/go/edge-go-remote-virtual"
make check
go-test:
needs: [helm-lint, validate-csv, validate-helm-values]
Expand All @@ -125,21 +116,12 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Setup JFrog CLI
id: jfrog
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: https://${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}/
with:
oidc-provider-name: nvgithub
oidc-audience: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
- name: Setup Go Proxy
id: setup-go-proxy
uses: nv-gha-runners/setup-artifactory-go-proxy@main
- env:
OIDC_USER: ${{ steps.jfrog.outputs.oidc-user }}
OIDC_TOKEN: ${{ steps.jfrog.outputs.oidc-token }}
OIDC_ARTIFACTORY_ENDPOINT: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
GOPROXY: ${{ steps.setup-go-proxy.outputs.goproxy-url }}
run: |
OIDC_USER_ENCODED=$(python3 -c 'import urllib.parse, os; print(urllib.parse.quote_plus(os.environ["OIDC_USER"]))')
export GOPROXY="https://${OIDC_USER_ENCODED}:${OIDC_TOKEN}@${OIDC_ARTIFACTORY_ENDPOINT}/artifactory/api/go/edge-go-remote-virtual"
make coverage
go-build:
needs: [helm-lint, validate-csv, validate-helm-values]
Expand Down Expand Up @@ -169,22 +151,13 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Setup JFrog CLI
id: jfrog
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: https://${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}/
with:
oidc-provider-name: nvgithub
oidc-audience: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
- name: Setup Go Proxy
id: setup-go-proxy
uses: nv-gha-runners/setup-artifactory-go-proxy@main
- name: Generate coverage report
env:
OIDC_USER: ${{ steps.jfrog.outputs.oidc-user }}
OIDC_TOKEN: ${{ steps.jfrog.outputs.oidc-token }}
OIDC_ARTIFACTORY_ENDPOINT: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
GOPROXY: ${{ steps.setup-go-proxy.outputs.goproxy-url }}
run: |
OIDC_USER_ENCODED=$(python3 -c 'import urllib.parse, os; print(urllib.parse.quote_plus(os.environ["OIDC_USER"]))')
export GOPROXY="https://${OIDC_USER_ENCODED}:${OIDC_TOKEN}@${OIDC_ARTIFACTORY_ENDPOINT}/artifactory/api/go/edge-go-remote-virtual"
make cov-report
- name: Upload to Coveralls
uses: coverallsapp/github-action@v2
Expand Down Expand Up @@ -230,24 +203,15 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup JFrog CLI
id: jfrog
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: https://${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}/
with:
oidc-provider-name: nvgithub
oidc-audience: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
- name: Setup Go Proxy
id: setup-go-proxy
uses: nv-gha-runners/setup-artifactory-go-proxy@main
- name: Build image
env:
IMAGE_NAME: ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator
VERSION: ${COMMIT_SHORT_SHA}-arm64
OIDC_USER: ${{ steps.jfrog.outputs.oidc-user }}
OIDC_TOKEN: ${{ steps.jfrog.outputs.oidc-token }}
OIDC_ARTIFACTORY_ENDPOINT: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
GOPROXY: ${{ steps.setup-go-proxy.outputs.goproxy-url }}
run: |
OIDC_USER_ENCODED=$(python3 -c 'import urllib.parse, os; print(urllib.parse.quote_plus(os.environ["OIDC_USER"]))')
export GOPROXY="https://${OIDC_USER_ENCODED}:${OIDC_TOKEN}@${OIDC_ARTIFACTORY_ENDPOINT}/artifactory/api/go/edge-go-remote-virtual"
echo "${VERSION}"
make build-image
build-gpu-operator-amd64:
Expand Down Expand Up @@ -287,24 +251,15 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup JFrog CLI
id: jfrog
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: https://${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}/
with:
oidc-provider-name: nvgithub
oidc-audience: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
- name: Setup Go Proxy
id: setup-go-proxy
uses: nv-gha-runners/setup-artifactory-go-proxy@main
- name: Build image
env:
IMAGE_NAME: ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator
VERSION: ${COMMIT_SHORT_SHA}-amd64
OIDC_USER: ${{ steps.jfrog.outputs.oidc-user }}
OIDC_TOKEN: ${{ steps.jfrog.outputs.oidc-token }}
OIDC_ARTIFACTORY_ENDPOINT: ${{ secrets.OIDC_ARTIFACTORY_ENDPOINT }}
GOPROXY: ${{ steps.setup-go-proxy.outputs.goproxy-url }}
run: |
OIDC_USER_ENCODED=$(python3 -c 'import urllib.parse, os; print(urllib.parse.quote_plus(os.environ["OIDC_USER"]))')
export GOPROXY="https://${OIDC_USER_ENCODED}:${OIDC_TOKEN}@${OIDC_ARTIFACTORY_ENDPOINT}/artifactory/api/go/edge-go-remote-virtual"
echo "${VERSION}"
make build-image

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ include $(CURDIR)/versions.mk

MODULE := github.com/NVIDIA/gpu-operator
BUILDER_IMAGE ?= golang:$(GOLANG_VERSION)
GOPROXY ?= direct
GOPROXY ?= https://proxy.golang.org,direct

ifeq ($(IMAGE_NAME),)
REGISTRY ?= nvcr.io/nvidia/cloud-native
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

FROM golang:1.25.1 AS builder

ARG GOPROXY=direct
ARG GOPROXY="https://proxy.golang.org,direct"
ENV GOPROXY=$GOPROXY

WORKDIR /workspace
Expand Down