Skip to content

Commit

Permalink
Bumping cli tools (#315)
Browse files Browse the repository at this point in the history
* using cci-common to install gcloud

Signed-off-by: Lasse Gaardsholt <[email protected]>

* forgot to add the orb

Signed-off-by: Lasse Gaardsholt <[email protected]>

* bumping yq from 4.25.2 to 4.44.3

Signed-off-by: Lasse Gaardsholt <[email protected]>

* bumping vault from 1.12.1 to 1.18.1

Signed-off-by: Lasse Gaardsholt <[email protected]>

* bump cci cli

Signed-off-by: Lasse Gaardsholt <[email protected]>

* can't use cci-common in a public orb

Signed-off-by: Lasse Gaardsholt <[email protected]>

* sigh

Signed-off-by: Lasse Gaardsholt <[email protected]>

* forgot this one

Signed-off-by: Lasse Gaardsholt <[email protected]>

* this is my quickfix branch and i will use to do my quickfixes

Signed-off-by: Lasse Gaardsholt <[email protected]>

* bump

Signed-off-by: Lasse Gaardsholt <[email protected]>

* going back

Signed-off-by: Lasse Gaardsholt <[email protected]>

---------

Signed-off-by: Lasse Gaardsholt <[email protected]>
  • Loading branch information
Gaardsholt authored Nov 8, 2024
1 parent 31de7cd commit fa06081
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
7 changes: 3 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
source $BASH_ENV || true
source /tmp/secrets || true
CCI_VERSION=0.1.22924
CCI_VERSION=0.1.30995
wget https://github.com/CircleCI-Public/circleci-cli/releases/download/v$CCI_VERSION/circleci-cli_$CCI_VERSION\_linux_amd64.tar.gz
tar -xf circleci-cli_$CCI_VERSION\_linux_amd64.tar.gz
mv circleci-cli_$CCI_VERSION\_linux_amd64 cli
Expand All @@ -152,18 +152,17 @@ common_context: &common_context
workflows:
test:
jobs:
- secret-injector/dump-secrets:
- secret-injector/dump-secrets-yaml:
name: secrets-common
secret-file: ci-secrets.yaml
vault-oidc: true
<<: [*common_context, *test_filter]
- cci-common/go_test_unit:
go_version: "1.22.0"
resource_class: xlarge
requires:
- secrets-common
<<: [*common_context, *test_filter]
- cci-common/go_test_sonar:
go_version: "1.22.0"
resource_class: xlarge
requires:
- secrets-common
Expand Down
15 changes: 3 additions & 12 deletions orb/orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ commands:
command: |
source $BASH_ENV || true
VERSION=v4.25.2
VERSION=v4.44.3
command -v yq >/dev/null 2>&1 || { $SUDO wget -O /usr/bin/yq https://github.com/mikefarah/yq/releases/download/$VERSION/yq_linux_amd64 && \
$SUDO chmod +x /usr/bin/yq; }
vault_install:
Expand All @@ -260,23 +260,20 @@ commands:
command: |
source $BASH_ENV || true
VERSION=1.12.1
VERSION=1.18.1
command -v vault >/dev/null 2>&1 || { $SUDO wget -O ./vault_$VERSION\_linux_amd64.zip https://releases.hashicorp.com/vault/$VERSION/vault_$VERSION\_linux_amd64.zip && \
$SUDO unzip -o ./vault_$VERSION\_linux_amd64.zip -d /usr/bin/. && \
$SUDO chmod +x /usr/bin/./vault
$SUDO rm ./vault_$VERSION\_linux_amd64.zip; }
vault-login:
steps:
- vault_install
- run:
name: Secret-injector - Vault login
command: |
source $BASH_ENV || true
vault login -no-print -method=userpass username=$VAULT_USERNAME password=$VAULT_PASSWORD
echo 'export VAULT_TOKEN=$(cat $HOME/.vault-token)' >> $BASH_ENV
python_install:
steps:
- run:
Expand All @@ -292,7 +289,6 @@ commands:
fi
( command -v python3 && command -v pip ) || $SUDO apt -qq update && $SUDO apt -qq install -y python3 python3-pip;
fi
curl_install:
steps:
- run:
Expand All @@ -308,19 +304,16 @@ commands:
fi
command -v curl >/dev/null 2>&1 || { $SUDO apt -qq update && $SUDO apt -qq install -y curl; }
fi
gcloud_install:
steps:
- run:
name: Install gcloud
command: |
source $BASH_ENV || true
GCLOUD_VERSION=422.0.0
GCLOUD_VERSION=500.0.0
command -v gcloud >/dev/null 2>&1 || { curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-"$GCLOUD_VERSION"-linux-x86_64.tar.gz --output "$HOME"/google-cloud-sdk-"$GCLOUD_VERSION"-linux-x86_64.tar.gz && \
tar -zxf "$HOME"/google-cloud-sdk-"$GCLOUD_VERSION"-linux-x86_64.tar.gz -C "$HOME" && \
"$HOME"/google-cloud-sdk/install.sh -q --command-completion true --path-update true; }
echo 'export PATH="$HOME"/google-cloud-sdk/bin/:${PATH}' >> "$BASH_ENV"
vault_login_oidc:
Expand Down Expand Up @@ -349,7 +342,6 @@ commands:
- run:
name: Generate credential configuration for CircleCI OIDC Token
command: |
echo $CIRCLE_OIDC_TOKEN > << parameters.oidc_token_file_path >>
# Create a credential configuration for the generated OIDC ID Token
Expand All @@ -361,7 +353,6 @@ commands:
- run:
name: Gcloud login using credential configuration
command: |
gcloud auth login --brief --cred-file "<< parameters.gcp_cred_config_file_path >>"
echo "export GOOGLE_APPLICATION_CREDENTIALS='<< parameters.gcp_cred_config_file_path >>'" | tee -a $BASH_ENV
Expand Down

0 comments on commit fa06081

Please sign in to comment.