Skip to content
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

fix(clouddriver): fix broken TARGETARCH comparison on ubuntu base #6124

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

wooseung-sim
Copy link
Contributor

Fixed broken Target Architecture comparison in the Ubuntu base Dockerfiles.

Ubuntu based images are using sh as a shell and sh shell does not support == operator.

But the Dockerfiles for Ubuntu based images are using this unsupported operator and it always fall back to arm regardless what the target platform is.

RUN [ $TARGETARCH == 'amd64' ] &&  export GCP_ARCH="x86_64" || export GCP_ARCH="arm"  \

eg> https://github.com/spinnaker/clouddriver/actions/runs/7180313240/job/19552298170

#13 [linux/amd64 5/8] RUN [ amd64 == 'amd64' ] &&  export GCP_ARCH="x86_64" || export GCP_ARCH="arm"    && wget -nv https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-412.0.0-linux-$***GCP_ARCH***.tar.gz   && mkdir -p /opt && cd /opt   && tar -xzf /google-cloud-sdk-412.0.0-linux-$***GCP_ARCH***.tar.gz   && rm /google-cloud-sdk-412.0.0-linux-$***GCP_ARCH***.tar.gz   && CLOUDSDK_PYTHON="python3" /opt/google-cloud-sdk/install.sh --usage-reporting=false --bash-completion=false       --additional-components app-engine-java app-engine-go gke-gcloud-auth-plugin    && rm -rf ~/.config/gcloud   && rm -rf /opt/google-cloud-sdk/.install/.backup
#13 0.071 /bin/sh: 1: [: amd64: unexpected operator
#13 2.160 2023-12-12 11:36:40 URL:https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-412.0.0-linux-arm.tar.gz [96294446/96294446] -> "google-cloud-sdk-412.0.0-linux-arm.tar.gz" [1]

Replaced bash equality operator == in Ubuntu Dockerfiles to sh string equality operator =

Copy link
Member

@jasonmcintosh jasonmcintosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch thanks for this!

@wooseung-sim
Copy link
Contributor Author

@Mergifyio update

Copy link
Contributor

mergify bot commented Feb 27, 2024

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/build.yml without workflows permission

@jasonmcintosh jasonmcintosh added the ready to merge Approved and ready for a merge label Feb 29, 2024
@mergify mergify bot added the auto merged Merged automatically by a bot label Feb 29, 2024
@mergify mergify bot merged commit cd5368c into spinnaker:master Feb 29, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for a merge target-release/1.34
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants