Repository navigation
MGMT-18313: Replace golang base image as it is based on Centos Linux 7 #6637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 1 commit into
openshift:master
from
danmanor:change-base-images
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ linters: | |
| - unconvert | ||
| - gci | ||
| - goimports | ||
| - scopelint | ||
| - exportloopref | ||
|
|
||
| linters-settings: | ||
| govet: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,22 @@ | ||
| ARG SERVICE=quay.io/edge-infrastructure/assisted-service:latest | ||
| FROM registry.ci.openshift.org/openshift/release:golang-1.20 AS download_dlv | ||
| FROM registry.access.redhat.com/ubi9/go-toolset:1.20 AS golang | ||
|
|
||
| RUN GOFLAGS=-mod=mod go install github.com/go-delve/delve/cmd/dlv@v1.21.2 | ||
|
|
||
| FROM $SERVICE | ||
| FROM quay.io/centos/centos:stream9 | ||
|
|
||
| ENV GOROOT=/usr/lib/golang | ||
| ENV GOPATH=/opt/app-root/src/go | ||
| ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin | ||
|
|
||
| COPY --from=golang $GOPATH $GOPATH | ||
| COPY --from=golang $GOROOT $GOROOT | ||
|
|
||
| RUN chmod 775 -R $GOPATH && chmod 775 -R $GOROOT | ||
|
|
||
| ARG DEBUG_SERVICE_PORT=40000 | ||
| COPY --from=download_dlv /go/bin/dlv / | ||
| EXPOSE 8090 $DEBUG_SERVICE_PORT | ||
|
|
||
| COPY assisted-service /assisted-service | ||
| COPY assisted-service-operator /assisted-service-operator | ||
| CMD ["/dlv", "--listen=:40000", "--headless=true", "--continue", "--api-version=2", "--accept-multiclient", "exec", "/assisted-service"] | ||
|
|
||
| CMD ["dlv", "--listen=:40000", "--headless=true", "--continue", "--api-version=2", "--accept-multiclient", "exec", "/assisted-service"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,28 @@ | ||
| FROM registry.access.redhat.com/ubi9/go-toolset:1.20 AS golang | ||
|
|
||
| RUN go install gotest.tools/gotestsum@latest | ||
|
|
||
| FROM quay.io/centos/centos:stream9 | ||
|
|
||
| RUN dnf install --enablerepo=crb -y \ | ||
| git unzip make gcc which nmstate-devel python3 | ||
| git unzip make gcc which nmstate-devel python3 openssl-devel | ||
|
|
||
| # Git checks if the user that owns the files on the filesystem match the | ||
| # current user. We need to disable this check because tests in Prow are | ||
| # running with a random user. | ||
| RUN git config --system --add safe.directory '*' | ||
|
|
||
| COPY --from=registry.ci.openshift.org/openshift/release:golang-1.20 /usr/local/go /usr/local/go | ||
| COPY --from=registry.ci.openshift.org/openshift/release:golang-1.20 /usr/bin/gotestsum /usr/bin/make /usr/bin/ | ||
|
|
||
| ENV GOPATH=/go | ||
| ENV GOROOT=/usr/local/go | ||
| ENV GOROOT=/usr/lib/golang | ||
| ENV GOPATH=/opt/app-root/src/go | ||
| ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin | ||
|
|
||
| COPY --from=golang $GOPATH $GOPATH | ||
| COPY --from=golang $GOROOT $GOROOT | ||
|
|
||
| COPY . /assisted-service/ | ||
| WORKDIR /assisted-service/ | ||
|
|
||
| RUN go mod tidy && go mod vendor | ||
|
|
||
| RUN chmod 775 -R $GOPATH && chmod 775 -R $(go env GOROOT) && chmod 775 -R /assisted-service/ && \ | ||
| RUN chmod 775 -R $GOPATH && chmod 775 -R $GOROOT && chmod 775 -R /assisted-service/ && \ | ||
| mkdir /.cache && chmod 775 -R /.cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| #!/bin/bash | ||
|
|
||
| tag=${1} | ||
| rhel_version=${1} | ||
| repo=crb | ||
|
|
||
| if [ "$tag" = "stream8" ]; then | ||
| if [ "$rhel_version" = "8" ]; then | ||
| repo=powertools | ||
| source ./utils.sh | ||
| replace_dnf_repositories_ref | ||
| fi | ||
|
|
||
| dnf install --enablerepo=$repo -y gcc git nmstate-devel && dnf clean all | ||
| dnf install --enablerepo=$repo -y gcc git nmstate-devel openssl-devel && dnf clean all |
4 changes: 2 additions & 2 deletions
4
hack/container_build_scripts/replace_dnf_repositories_ref_if_needed.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| #!/bin/bash | ||
|
|
||
| tag=${1} | ||
| rhel_version=${1} | ||
|
|
||
| if [ "$tag" = "stream8" ]; then | ||
| if [ "$rhel_version" = "8" ]; then | ||
| source ./utils.sh | ||
| replace_dnf_repositories_ref | ||
| fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.