Skip to content

Commit

Permalink
Make CI-RP Improvements (#3791)
Browse files Browse the repository at this point in the history
- Remove linting from ci-rp
- Remove generate from ci-rp
  • Loading branch information
SudoBrendan authored and edisonLcardenas committed Sep 16, 2024
1 parent a251ebe commit b2cebea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 4 additions & 10 deletions Dockerfile.ci-rp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ARG ARO_VERSION

###############################################################################
# Stage 1: Build the SRE Portal Assets
# builder is responsible for all compilation and validation of the RP
###############################################################################
FROM ${REGISTRY}/ubi8/nodejs-16 as portal-build
LABEL aro-portal-build=true
Expand Down Expand Up @@ -33,15 +32,10 @@ WORKDIR /app
ENV GOPATH=/root/go
ENV GOFLAGS="-tags=containers_image_openpgp,exclude_graphdriver_btrfs,exclude_graphdriver_devicemapper"

# Install golangci-lint and verify
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v1.56.2 && \
golangci-lint --version || (echo "golangci-lint not found" && exit 1)

# Copy dependencies and source files
COPY go.mod go.sum ./
COPY vendor vendor
COPY swagger swagger
COPY .golangci.yml ./
COPY hack hack
COPY cmd cmd
COPY pkg pkg
Expand All @@ -50,14 +44,14 @@ COPY test test
# Ensure JS assets are available before generating Go code
COPY --from=portal-build /build/pkg/portal/assets/v2/build /app/pkg/portal/assets/v2/build

# Lint, generate, build, and test
RUN golangci-lint run --verbose
RUN go generate ./...
# Build RP and E2E test suite bins
RUN go build -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=${ARO_VERSION}" ./cmd/aro
RUN go test ./test/e2e/... -tags e2e,codec.safe -c -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=${ARO_VERSION}" -o e2e.test

# Additional tests
# Run unit tests
RUN go run gotest.tools/[email protected] --format pkgname --junitfile report.xml -- -coverprofile=cover.out ./...

# Validate FIPS
RUN hack/fips/validate-fips.sh ./aro
LABEL stage="rp-build-cache-layer"

Expand Down
1 change: 0 additions & 1 deletion Dockerfile.ci-rp.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*

# ...except these
!.golangci.yml
!cmd
!go.mod
!go.sum
Expand Down

0 comments on commit b2cebea

Please sign in to comment.