diff --git a/.rwx/package.yml b/.rwx/package.yml index 0cdf4e99..83fd7b51 100644 --- a/.rwx/package.yml +++ b/.rwx/package.yml @@ -27,8 +27,13 @@ tasks: env: DIRECTORY: ${{ init.directory }} + - key: go + call: golang/install 1.1.5 + with: + go-version: "1.23.3" + - key: build - use: code + use: [go, code] run: | cd $DIRECTORY if [[ -f build/run.sh ]]; then diff --git a/aws/assume-role/README.md b/aws/assume-role/README.md index 7d293afb..a8d9b909 100644 --- a/aws/assume-role/README.md +++ b/aws/assume-role/README.md @@ -8,7 +8,7 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role @@ -30,7 +30,7 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role @@ -50,7 +50,7 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role @@ -73,7 +73,7 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role @@ -96,7 +96,7 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role @@ -119,14 +119,14 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: oidc-token: ${{ vaults.your-vault.oidc.your-token }} region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role - key: chained-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-other-role @@ -149,14 +149,14 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role profile-name: your-profile - key: chained-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: source-profile-name: your-profile region: us-east-2 @@ -210,7 +210,7 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role @@ -261,14 +261,14 @@ tasks: call: aws/install-cli 1.0.8 - key: assume-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: oidc-token: ${{ vaults.your-vault.oidc.your-token }} region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-role - key: chain-role - call: aws/assume-role 2.0.7 + call: aws/assume-role 2.0.8 with: region: us-east-2 role-to-assume: arn:aws:iam::your-account-id:role/your-other-role diff --git a/aws/assume-role/rwx-ci-cd.template.yml b/aws/assume-role/rwx-ci-cd.template.yml deleted file mode 100644 index 1c3719b5..00000000 --- a/aws/assume-role/rwx-ci-cd.template.yml +++ /dev/null @@ -1,93 +0,0 @@ -- key: install-cli - call: aws/install-cli 1.0.8 - -- key: test--defaults - call: $LEAF_DIGEST - with: - region: us-east-2 - role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} - -- key: test--defaults--assert - use: [install-cli, test--defaults] - run: aws sts get-caller-identity &> /dev/null # avoid leaking account/role info - env: - AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} - -- key: test--defaults--skip-auth--assert - use: [install-cli, test--defaults] - run: | - if ! (aws sts get-caller-identity &> /dev/null); then - echo "Not authenticated with AWS." - exit 0 - fi - echo "Authenticated with AWS." - exit 1 - env: - AWS_SKIP_AUTH: true - -- key: test--parallel-group - call: $LEAF_DIGEST - with: - region: us-east-2 - role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} -- key: test--parallel-group--assert - use: [install-cli, test--parallel-group] - parallel: 2 - run: | - aws sts get-caller-identity &> /dev/null # avoid leaking account/role info - env: - AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} - -- key: test--custom-profile - call: $LEAF_DIGEST - with: - region: us-east-2 - role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} - profile-name: custom - oidc-token-env-var: AWS_OIDC_TOKEN_2 -- key: test--multiple-profiles--assert - use: [install-cli, test--defaults, test--custom-profile] - run: - - aws sts get-caller-identity &> /dev/null # avoid leaking account/role info - - aws sts get-caller-identity --profile custom &> /dev/null # avoid leaking account/role info - env: - AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} - AWS_OIDC_TOKEN_2: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} - -- key: test--defaults--role-chain - call: $LEAF_DIGEST - with: - region: us-east-2 - role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-chain-assume }} - role-chaining: true -- key: test--defaults--role-chain--assert - use: [install-cli, test--defaults, test--defaults--role-chain] - run: aws sts get-caller-identity &> /dev/null # avoid leaking account/role info - env: - AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} - -- key: test--specified-profile-name - call: $LEAF_DIGEST - with: - region: us-east-2 - role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} - profile-name: my-profile -- key: test--specified-profile-name--assert - use: [install-cli, test--specified-profile-name] - run: aws sts get-caller-identity --profile my-profile &> /dev/null # avoid leaking account/role info - env: - AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} - -- key: test--specified-profile-name--role-chain - call: $LEAF_DIGEST - with: - region: us-east-2 - role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-chain-assume }} - source-profile-name: my-profile - profile-name: my-other-profile - role-chaining: true -- key: test--specified-profile-name--role-chain--assert - use: [install-cli, test--specified-profile-name, test--specified-profile-name--role-chain] - run: aws sts get-caller-identity --profile my-other-profile &> /dev/null # avoid leaking account/role info - env: - AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} diff --git a/aws/assume-role/rwx-package.yml b/aws/assume-role/rwx-package.yml index 0fae78be..96bfad79 100644 --- a/aws/assume-role/rwx-package.yml +++ b/aws/assume-role/rwx-package.yml @@ -1,5 +1,5 @@ name: aws/assume-role -version: 2.0.7 +version: 2.0.8 description: Assume an AWS role source_code_url: https://github.com/rwx-cloud/packages/tree/main/aws/assume-role issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/aws/assume-role/rwx-test.yml b/aws/assume-role/rwx-test.yml new file mode 100644 index 00000000..940c4bc5 --- /dev/null +++ b/aws/assume-role/rwx-test.yml @@ -0,0 +1,98 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + +tasks: + - key: install-cli + call: aws/install-cli 1.0.8 + + - key: test--defaults + call: ${{ init.package-digest }} + with: + region: us-east-2 + role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} + + - key: test--defaults--assert + use: [install-cli, test--defaults] + run: aws sts get-caller-identity &> /dev/null # avoid leaking account/role info + env: + AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} + + - key: test--defaults--skip-auth--assert + use: [install-cli, test--defaults] + run: | + if ! (aws sts get-caller-identity &> /dev/null); then + echo "Not authenticated with AWS." + exit 0 + fi + echo "Authenticated with AWS." + exit 1 + env: + AWS_SKIP_AUTH: true + + - key: test--parallel-group + call: ${{ init.package-digest }} + with: + region: us-east-2 + role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} + - key: test--parallel-group--assert + use: [install-cli, test--parallel-group] + parallel: 2 + run: | + aws sts get-caller-identity &> /dev/null # avoid leaking account/role info + env: + AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} + + - key: test--custom-profile + call: ${{ init.package-digest }} + with: + region: us-east-2 + role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} + profile-name: custom + oidc-token-env-var: AWS_OIDC_TOKEN_2 + - key: test--multiple-profiles--assert + use: [install-cli, test--defaults, test--custom-profile] + run: + - aws sts get-caller-identity &> /dev/null # avoid leaking account/role info + - aws sts get-caller-identity --profile custom &> /dev/null # avoid leaking account/role info + env: + AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} + AWS_OIDC_TOKEN_2: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} + + - key: test--defaults--role-chain + call: ${{ init.package-digest }} + with: + region: us-east-2 + role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-chain-assume }} + role-chaining: true + - key: test--defaults--role-chain--assert + use: [install-cli, test--defaults, test--defaults--role-chain] + run: aws sts get-caller-identity &> /dev/null # avoid leaking account/role info + env: + AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} + + - key: test--specified-profile-name + call: ${{ init.package-digest }} + with: + region: us-east-2 + role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }} + profile-name: my-profile + - key: test--specified-profile-name--assert + use: [install-cli, test--specified-profile-name] + run: aws sts get-caller-identity --profile my-profile &> /dev/null # avoid leaking account/role info + env: + AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} + + - key: test--specified-profile-name--role-chain + call: ${{ init.package-digest }} + with: + region: us-east-2 + role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-chain-assume }} + source-profile-name: my-profile + profile-name: my-other-profile + role-chaining: true + - key: test--specified-profile-name--role-chain--assert + use: [install-cli, test--specified-profile-name, test--specified-profile-name--role-chain] + run: aws sts get-caller-identity --profile my-other-profile &> /dev/null # avoid leaking account/role info + env: + AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }} diff --git a/aws/install-cli/README.md b/aws/install-cli/README.md index 34d836d3..e3c7b45f 100644 --- a/aws/install-cli/README.md +++ b/aws/install-cli/README.md @@ -5,7 +5,7 @@ To install the latest version of the AWS CLI: ```yaml tasks: - key: aws-cli - call: aws/install-cli 1.0.9 + call: aws/install-cli 1.0.10 ``` To install a specific version of the AWS CLI (only v2 of the AWS CLI is supported): @@ -13,7 +13,7 @@ To install a specific version of the AWS CLI (only v2 of the AWS CLI is supporte ```yaml tasks: - key: aws-cli - call: aws/install-cli 1.0.9 + call: aws/install-cli 1.0.10 with: cli-version: "2.15.13" ``` diff --git a/aws/install-cli/rwx-ci-cd.config.yml b/aws/install-cli/rwx-ci-cd.config.yml deleted file mode 100644 index 86aa4abf..00000000 --- a/aws/install-cli/rwx-ci-cd.config.yml +++ /dev/null @@ -1,28 +0,0 @@ -tests: - - key: ubuntu-22-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-22-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: arm64 - - - key: ubuntu-24-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-24-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: arm64 diff --git a/aws/install-cli/rwx-ci-cd.template.yml b/aws/install-cli/rwx-ci-cd.template.yml deleted file mode 100644 index f64a7cf3..00000000 --- a/aws/install-cli/rwx-ci-cd.template.yml +++ /dev/null @@ -1,15 +0,0 @@ -- key: test-default - call: $LEAF_DIGEST - -- key: test-default--assert - use: test-default - run: aws --version | grep 'aws-cli/2\.' - -- key: test-specified - call: $LEAF_DIGEST - with: - cli-version: "2.0.30" - -- key: test-specified--assert - use: test-specified - run: aws --version | grep 'aws-cli/2\.0\.30' diff --git a/aws/install-cli/rwx-package.yml b/aws/install-cli/rwx-package.yml index 9a94fff1..624273d0 100644 --- a/aws/install-cli/rwx-package.yml +++ b/aws/install-cli/rwx-package.yml @@ -1,5 +1,5 @@ name: aws/install-cli -version: 1.0.9 +version: 1.0.10 description: Install the AWS CLI source_code_url: https://github.com/rwx-cloud/packages/tree/main/aws/install-cli issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/aws/install-cli/rwx-test-base.json b/aws/install-cli/rwx-test-base.json new file mode 100644 index 00000000..093a55cc --- /dev/null +++ b/aws/install-cli/rwx-test-base.json @@ -0,0 +1,22 @@ +[ + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + } +] diff --git a/aws/install-cli/rwx-test.yml b/aws/install-cli/rwx-test.yml new file mode 100644 index 00000000..cf544575 --- /dev/null +++ b/aws/install-cli/rwx-test.yml @@ -0,0 +1,21 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: test-default + call: ${{ init.package-digest }} + + - key: test-default--assert + use: test-default + run: aws --version | grep 'aws-cli/2\.' + + - key: test-specified + call: ${{ init.package-digest }} + with: + cli-version: "2.0.30" + + - key: test-specified--assert + use: test-specified + run: aws --version | grep 'aws-cli/2\.0\.30' diff --git a/azure/auth-oidc/README.md b/azure/auth-oidc/README.md index 2fdb816b..d8d8304f 100644 --- a/azure/auth-oidc/README.md +++ b/azure/auth-oidc/README.md @@ -14,7 +14,7 @@ tasks: - key: azure-auth use: azure-cli - call: azure/auth-oidc 1.0.4 + call: azure/auth-oidc 1.0.5 with: oidc-token: ${{ vaults.your-vault.oidc.your-token }} client-id: ${{ vaults.your-vault.secrets.your-azure-client-id }} @@ -31,7 +31,7 @@ tasks: - key: azure-auth use: azure-cli - call: azure/auth-oidc 1.0.4 + call: azure/auth-oidc 1.0.5 with: oidc-token: ${{ vaults.your-vault.oidc.your-token }} client-id: ${{ vaults.your-vault.secrets.your-azure-client-id }} diff --git a/azure/auth-oidc/rwx-ci-cd.template.yml b/azure/auth-oidc/rwx-ci-cd.template.yml deleted file mode 100644 index 09e3acb0..00000000 --- a/azure/auth-oidc/rwx-ci-cd.template.yml +++ /dev/null @@ -1,17 +0,0 @@ -- key: install-cli - call: azure/install-cli 1.0.8 - -- key: test--authenticate - use: install-cli - call: $LEAF_DIGEST - with: - oidc-token: ${{ vaults.mint_leaves_azure_auth_testing.oidc.azure }} - client-id: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_CLIENT_ID }} - subscription-id: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_SUBSCRIPTION_ID }} - tenant-id: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_TENANT_ID }} - -- key: test--authenticate--assert - use: test--authenticate - run: az account show | grep "${TENANT_ID}" - env: - TENANT_ID: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_TENANT_ID }} diff --git a/azure/auth-oidc/rwx-package.yml b/azure/auth-oidc/rwx-package.yml index 49b43751..01b26995 100644 --- a/azure/auth-oidc/rwx-package.yml +++ b/azure/auth-oidc/rwx-package.yml @@ -1,5 +1,5 @@ name: azure/auth-oidc -version: 1.0.4 +version: 1.0.5 description: Authenticate the Azure CLI via OIDC source_code_url: https://github.com/rwx-cloud/packages/tree/main/azure/auth-oidc issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/azure/auth-oidc/rwx-test.yml b/azure/auth-oidc/rwx-test.yml new file mode 100644 index 00000000..f7b8b11b --- /dev/null +++ b/azure/auth-oidc/rwx-test.yml @@ -0,0 +1,23 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: install-cli + call: azure/install-cli 1.0.8 + + - key: test--authenticate + use: install-cli + call: ${{ init.package-digest }} + with: + oidc-token: ${{ vaults.mint_leaves_azure_auth_testing.oidc.azure }} + client-id: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_CLIENT_ID }} + subscription-id: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_SUBSCRIPTION_ID }} + tenant-id: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_TENANT_ID }} + + - key: test--authenticate--assert + use: test--authenticate + run: az account show | grep "${TENANT_ID}" + env: + TENANT_ID: ${{ vaults.mint_leaves_azure_auth_testing.secrets.AZURE_TENANT_ID }} diff --git a/azure/install-cli/README.md b/azure/install-cli/README.md index 556d4688..04bdb068 100644 --- a/azure/install-cli/README.md +++ b/azure/install-cli/README.md @@ -5,7 +5,7 @@ To install the latest version of the Azure CLI: ```yaml tasks: - key: azure-cli - call: azure/install-cli 1.0.9 + call: azure/install-cli 1.0.10 ``` To install a specific version of the Azure CLI: @@ -13,7 +13,7 @@ To install a specific version of the Azure CLI: ```yaml tasks: - key: azure-cli - call: azure/install-cli 1.0.9 + call: azure/install-cli 1.0.10 with: version: "2.65.0" ``` diff --git a/azure/install-cli/rwx-ci-cd.config.yml b/azure/install-cli/rwx-ci-cd.config.yml deleted file mode 100644 index 86aa4abf..00000000 --- a/azure/install-cli/rwx-ci-cd.config.yml +++ /dev/null @@ -1,28 +0,0 @@ -tests: - - key: ubuntu-22-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-22-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: arm64 - - - key: ubuntu-24-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-24-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: arm64 diff --git a/azure/install-cli/rwx-ci-cd.template.yml b/azure/install-cli/rwx-ci-cd.template.yml deleted file mode 100644 index 83f47ee9..00000000 --- a/azure/install-cli/rwx-ci-cd.template.yml +++ /dev/null @@ -1,15 +0,0 @@ -- key: test-default - call: $LEAF_DIGEST - -- key: test-default--assert - use: test-default - run: az version | jq -r '."azure-cli"' | grep '^[0-9.]\+$' - -- key: test-specified - call: $LEAF_DIGEST - with: - version: "2.64.0" - -- key: test-specified--assert - use: test-specified - run: az version | jq -e '."azure-cli" == "2.64.0"' diff --git a/azure/install-cli/rwx-package.yml b/azure/install-cli/rwx-package.yml index 55aace8d..0ec01dfc 100644 --- a/azure/install-cli/rwx-package.yml +++ b/azure/install-cli/rwx-package.yml @@ -1,5 +1,5 @@ name: azure/install-cli -version: 1.0.9 +version: 1.0.10 description: Install the Azure CLI source_code_url: https://github.com/rwx-cloud/packages/tree/main/azure/install-cli issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/azure/install-cli/rwx-test-base.json b/azure/install-cli/rwx-test-base.json new file mode 100644 index 00000000..093a55cc --- /dev/null +++ b/azure/install-cli/rwx-test-base.json @@ -0,0 +1,22 @@ +[ + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + } +] diff --git a/azure/install-cli/rwx-test.yml b/azure/install-cli/rwx-test.yml new file mode 100644 index 00000000..d0d9bba8 --- /dev/null +++ b/azure/install-cli/rwx-test.yml @@ -0,0 +1,21 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: test-default + call: ${{ init.package-digest }} + + - key: test-default--assert + use: test-default + run: az version | jq -r '."azure-cli"' | grep '^[0-9.]\+$' + + - key: test-specified + call: ${{ init.package-digest }} + with: + version: "2.64.0" + + - key: test-specified--assert + use: test-specified + run: az version | jq -e '."azure-cli" == "2.64.0"' diff --git a/depot/install-cli/README.md b/depot/install-cli/README.md index 27cc4e8b..111a0103 100644 --- a/depot/install-cli/README.md +++ b/depot/install-cli/README.md @@ -5,7 +5,7 @@ To install the latest version of the Depot CLI: ```yaml tasks: - key: depot-cli - call: depot/install-cli 1.0.3 + call: depot/install-cli 1.0.4 ``` To install a specific version of the Depot CLI: @@ -13,7 +13,7 @@ To install a specific version of the Depot CLI: ```yaml tasks: - key: depot-cli - call: depot/install-cli 1.0.3 + call: depot/install-cli 1.0.4 with: cli-version: "2.53.0" ``` diff --git a/depot/install-cli/rwx-ci-cd.template.yml b/depot/install-cli/rwx-ci-cd.template.yml deleted file mode 100644 index 1d8dc4e4..00000000 --- a/depot/install-cli/rwx-ci-cd.template.yml +++ /dev/null @@ -1,12 +0,0 @@ -- key: depot--install-cli--test-default - call: $LEAF_DIGEST -- key: depot--install-cli--test-default--assert - use: depot--install-cli--test-default - run: depot --version | head -1 | grep 'depot version 2\.' -- key: depot--install-cli--test-specified - call: $LEAF_DIGEST - with: - cli-version: "2.52.0" -- key: depot--install-cli--test-specified--assert - use: depot--install-cli--test-specified - run: depot --version | head -1 | grep 'depot version 2\.52\.0 ' diff --git a/depot/install-cli/rwx-package.yml b/depot/install-cli/rwx-package.yml index e9a863eb..28309b6f 100644 --- a/depot/install-cli/rwx-package.yml +++ b/depot/install-cli/rwx-package.yml @@ -1,5 +1,5 @@ name: depot/install-cli -version: 1.0.3 +version: 1.0.4 description: Install the Depot CLI source_code_url: https://github.com/rwx-cloud/packages/tree/main/depot/install-cli issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/depot/install-cli/rwx-test.yml b/depot/install-cli/rwx-test.yml new file mode 100644 index 00000000..ee1dd0fb --- /dev/null +++ b/depot/install-cli/rwx-test.yml @@ -0,0 +1,21 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: test-default + call: ${{ init.package-digest }} + + - key: test-default--assert + use: test-default + run: depot --version | head -1 | grep 'depot version 2\.' + + - key: test-specified + call: ${{ init.package-digest }} + with: + cli-version: "2.52.0" + + - key: test-specified--assert + use: test-specified + run: depot --version | head -1 | grep 'depot version 2\.52\.0 ' diff --git a/docker/login-hook/README.md b/docker/login-hook/README.md index d12b7d9e..5ad37ca0 100644 --- a/docker/login-hook/README.md +++ b/docker/login-hook/README.md @@ -15,7 +15,7 @@ of the registry as the `registry` parameter to this leaf. ```yaml tasks: - key: docker-login - call: docker/login-hook 1.0.4 + call: docker/login-hook 1.0.5 with: username: my-username @@ -32,7 +32,7 @@ Override the registry: ```yaml tasks: - key: docker-login - call: docker/login-hook 1.0.4 + call: docker/login-hook 1.0.5 with: username: my-username registry: custom-registry.your-company.com @@ -53,12 +53,12 @@ However, you'll need to specify `password-env-name` to prevent conflicts. ```yaml tasks: - key: docker-login-dockerhub - call: docker/login-hook 1.0.4 + call: docker/login-hook 1.0.5 with: username: my-username - key: docker-login-other-registry - call: docker/login-hook 1.0.4 + call: docker/login-hook 1.0.5 with: username: my-username password-env-name: OTHER_REGISTRY_PASSWORD @@ -82,7 +82,7 @@ organization name for the username and the access token for the password: ```yaml tasks: - key: docker-login - call: docker/login-hook 1.0.4 + call: docker/login-hook 1.0.5 with: username: my-docker-organization diff --git a/docker/login-hook/rwx-ci-cd.template.yml b/docker/login-hook/rwx-ci-cd.template.yml deleted file mode 100644 index 33f3c675..00000000 --- a/docker/login-hook/rwx-ci-cd.template.yml +++ /dev/null @@ -1,43 +0,0 @@ -- key: docker--login--test - call: $LEAF_DIGEST - with: - username: ${{ vaults.mint_leaves_development.secrets.DOCKER_HUB_USERNAME }} - -- key: docker--login--test--assert-with-password-env - use: docker--login--test - docker: true - run: | - set +e - cat ~/.docker/config.json | jq -e '.auths | has("https://index.docker.io/v1/")' > /dev/null - if [ $? -ne 0 ]; then - >&2 echo "Expected auths for https://index.docker.io/v1/ in ~/.docker/config.json" - exit 1 - fi - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - -- key: docker--login--test--assert-without-password-env--logged-in-before - use: [docker--login--test, docker--login--test--assert-with-password-env] - docker: true - run: | - set +e - [ -e ~/.docker/config.json ] || exit 0 - - cat ~/.docker/config.json | jq -e '.auths | has("https://index.docker.io/v1/")' > /dev/null - if [ $? -eq 0 ]; then - >&2 echo "Expected no auths for https://index.docker.io/v1/ in ~/.docker/config.json" - exit 1 - fi - -- key: docker--login--test--assert-without-password-env--not-logged-in-before - use: docker--login--test - docker: true - run: | - set +e - [ -e ~/.docker/config.json ] || exit 0 - - cat ~/.docker/config.json | jq -e '.auths | has("https://index.docker.io/v1/")' > /dev/null - if [ $? -eq 0 ]; then - >&2 echo "Expected no auths for https://index.docker.io/v1/ in ~/.docker/config.json" - exit 1 - fi diff --git a/docker/login-hook/rwx-package.yml b/docker/login-hook/rwx-package.yml index be8e7b32..687bc21d 100644 --- a/docker/login-hook/rwx-package.yml +++ b/docker/login-hook/rwx-package.yml @@ -1,5 +1,5 @@ name: docker/login-hook -version: 1.0.4 +version: 1.0.5 description: Mint hook to log in to a Docker registry source_code_url: https://github.com/rwx-cloud/packages/tree/main/docker/login-hook issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/docker/login-hook/rwx-test.yml b/docker/login-hook/rwx-test.yml new file mode 100644 index 00000000..946ddb1d --- /dev/null +++ b/docker/login-hook/rwx-test.yml @@ -0,0 +1,49 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: docker--login--test + call: ${{ init.package-digest }} + with: + username: ${{ vaults.mint_leaves_development.secrets.DOCKER_HUB_USERNAME }} + + - key: docker--login--test--assert-with-password-env + use: docker--login--test + docker: true + run: | + set +e + cat ~/.docker/config.json | jq -e '.auths | has("https://index.docker.io/v1/")' > /dev/null + if [ $? -ne 0 ]; then + >&2 echo "Expected auths for https://index.docker.io/v1/ in ~/.docker/config.json" + exit 1 + fi + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - key: docker--login--test--assert-without-password-env--logged-in-before + use: [docker--login--test, docker--login--test--assert-with-password-env] + docker: true + run: | + set +e + [ -e ~/.docker/config.json ] || exit 0 + + cat ~/.docker/config.json | jq -e '.auths | has("https://index.docker.io/v1/")' > /dev/null + if [ $? -eq 0 ]; then + >&2 echo "Expected no auths for https://index.docker.io/v1/ in ~/.docker/config.json" + exit 1 + fi + + - key: docker--login--test--assert-without-password-env--not-logged-in-before + use: docker--login--test + docker: true + run: | + set +e + [ -e ~/.docker/config.json ] || exit 0 + + cat ~/.docker/config.json | jq -e '.auths | has("https://index.docker.io/v1/")' > /dev/null + if [ $? -eq 0 ]; then + >&2 echo "Expected no auths for https://index.docker.io/v1/ in ~/.docker/config.json" + exit 1 + fi diff --git a/elixir-lang/install/README.md b/elixir-lang/install/README.md index 821bcda0..8d9948ed 100644 --- a/elixir-lang/install/README.md +++ b/elixir-lang/install/README.md @@ -5,13 +5,13 @@ To install Elixir, you'll need to have Erlang installed. ```yaml tasks: - key: erlang - call: erlang/install 1.1.1 + call: erlang/install 1.1.3 with: erlang-version: "26.2.3" - key: elixir use: erlang - call: elixir-lang/install 1.1.3 + call: elixir-lang/install 1.1.4 with: elixir-version: "1.17.2" ``` diff --git a/elixir-lang/install/rwx-ci-cd.config.yml b/elixir-lang/install/rwx-ci-cd.config.yml deleted file mode 100644 index a925db7f..00000000 --- a/elixir-lang/install/rwx-ci-cd.config.yml +++ /dev/null @@ -1,14 +0,0 @@ -tests: - - key: ubuntu-22-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-24-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: x86_64 diff --git a/elixir-lang/install/rwx-ci-cd.template.yml b/elixir-lang/install/rwx-ci-cd.template.yml deleted file mode 100644 index 5b98702d..00000000 --- a/elixir-lang/install/rwx-ci-cd.template.yml +++ /dev/null @@ -1,31 +0,0 @@ -- key: erlang-27-3-3 - call: erlang/install 1.1.1 - with: - erlang-version: 27.3.3 - -- key: erlang-28-1 - call: erlang/install 1.1.1 - with: - erlang-version: 28.1 - -- key: install-1-17-2-on-27-3-3 - use: erlang-27-3-3 - call: $LEAF_DIGEST - with: - elixir-version: 1.17.2 - -- key: install-1-17-2-on-27-3-3--assert - use: install-1-17-2-on-27-3-3 - run: | - elixir --version | grep '^Elixir 1\.17\.2' - -- key: install-1-18-4-on-28-1 - use: erlang-28-1 - call: $LEAF_DIGEST - with: - elixir-version: 1.18.4 - -- key: install-1-18-4-on-28-1--assert - use: install-1-18-4-on-28-1 - run: | - elixir --version | grep '^Elixir 1\.18\.4' diff --git a/elixir-lang/install/rwx-package.yml b/elixir-lang/install/rwx-package.yml index d4d26d7a..ab3c083e 100644 --- a/elixir-lang/install/rwx-package.yml +++ b/elixir-lang/install/rwx-package.yml @@ -1,5 +1,5 @@ name: elixir-lang/install -version: 1.1.3 +version: 1.1.4 description: Install Elixir, a dynamic, functional language for building scalable and maintainable applications. source_code_url: https://github.com/rwx-cloud/packages/tree/main/elixir-lang/install issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/elixir-lang/install/rwx-test-base.json b/elixir-lang/install/rwx-test-base.json new file mode 100644 index 00000000..33b17a5e --- /dev/null +++ b/elixir-lang/install/rwx-test-base.json @@ -0,0 +1,12 @@ +[ + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + } +] diff --git a/elixir-lang/install/rwx-test.yml b/elixir-lang/install/rwx-test.yml new file mode 100644 index 00000000..6ea0b100 --- /dev/null +++ b/elixir-lang/install/rwx-test.yml @@ -0,0 +1,37 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: erlang-27-3-3 + call: erlang/install 1.1.1 + with: + erlang-version: 27.3.3 + + - key: erlang-28-1 + call: erlang/install 1.1.1 + with: + erlang-version: 28.1 + + - key: install-1-17-2-on-27-3-3 + use: erlang-27-3-3 + call: ${{ init.package-digest }} + with: + elixir-version: 1.17.2 + + - key: install-1-17-2-on-27-3-3--assert + use: install-1-17-2-on-27-3-3 + run: | + elixir --version | grep '^Elixir 1\.17\.2' + + - key: install-1-18-4-on-28-1 + use: erlang-28-1 + call: ${{ init.package-digest }} + with: + elixir-version: 1.18.4 + + - key: install-1-18-4-on-28-1--assert + use: install-1-18-4-on-28-1 + run: | + elixir --version | grep '^Elixir 1\.18\.4' diff --git a/github/compare/README.md b/github/compare/README.md index ab3aa8b5..4d88e401 100644 --- a/github/compare/README.md +++ b/github/compare/README.md @@ -19,7 +19,7 @@ tasks: - key: go-files use: github-cli - call: github/compare 1.0.6 + call: github/compare 1.0.7 with: repository: my-organization/my-repository base-ref: abc123 @@ -41,7 +41,7 @@ tasks: - key: go-files use: github-cli - call: github/compare 1.0.6 + call: github/compare 1.0.7 with: repository: my-organization/my-repository base-ref: abc123 @@ -79,7 +79,7 @@ tasks: - key: go-files use: github-cli - call: github/compare 1.0.6 + call: github/compare 1.0.7 with: repository: my-organization/my-repository base-ref: ${{ init.base-ref }} @@ -111,7 +111,7 @@ tasks: - key: go-files use: github-cli - call: github/compare 1.0.6 + call: github/compare 1.0.7 with: repository: my-organization/my-repository base-ref: ${{ init.base-ref }} diff --git a/github/compare/build/dependencies.yml b/github/compare/build/dependencies.yml deleted file mode 100644 index ea483a5c..00000000 --- a/github/compare/build/dependencies.yml +++ /dev/null @@ -1,4 +0,0 @@ -- key: go - call: golang/install 1.1.5 - with: - go-version: "1.23.3" diff --git a/github/compare/rwx-ci-cd.template.yml b/github/compare/rwx-ci-cd.template.yml deleted file mode 100644 index 7e6f458a..00000000 --- a/github/compare/rwx-ci-cd.template.yml +++ /dev/null @@ -1,151 +0,0 @@ -- key: github-cli - call: github/install-cli 1.0.8 - -- key: test-one-pattern-has-changes - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf - head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 - github-token: ${{ github['rwx-research'].token }} - patterns: "**/*.go" - -- key: assert-one-pattern-has-changes - run: | - [ "${{ tasks.test-one-pattern-has-changes.values.has-changes }}" == "true" ] - - echo "internal/cli/parse.go" >> expected_changes.txt - echo "internal/fs/local.go" >> expected_changes.txt - echo "internal/fs/local_test.go" >> expected_changes.txt - echo -n "test/oss_integration_test.go" >> expected_changes.txt - expected_changes=$(cat expected_changes.txt) - [ "${{ tasks.test-one-pattern-has-changes.values.changes }}" == "${expected_changes}" ] - -- key: test-multiple-patterns-have-changes - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf - head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 - github-token: ${{ github['rwx-research'].token }} - patterns: | - **/*.go - **/*.txt - -- key: assert-multiple-patterns-have-changes - run: | - [ "${{ tasks.test-multiple-patterns-have-changes.values.have-changes }}" == "true" ] - - echo "internal/cli/parse.go" >> expected_changes.txt - echo "internal/fs/local.go" >> expected_changes.txt - echo "internal/fs/local_test.go" >> expected_changes.txt - echo "test/fixtures/filenames/nested/$ @=:+{}[]^><~#|.txt" >> expected_changes.txt - echo "test/fixtures/filenames/nested/**.txt" >> expected_changes.txt - echo "test/fixtures/filenames/nested/*.txt" >> expected_changes.txt - echo "test/fixtures/filenames/nested/?.txt" >> expected_changes.txt - echo "test/fixtures/filenames/nested/[].txt" >> expected_changes.txt - echo "test/fixtures/filenames/nested/\.txt" >> expected_changes.txt - echo -n "test/oss_integration_test.go" >> expected_changes.txt - expected_changes=$(cat expected_changes.txt) - [ "${{ tasks.test-multiple-patterns-have-changes.values.changes }}" == "${expected_changes}" ] - -- key: test-negations-have-changes - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf - head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 - github-token: ${{ github['rwx-research'].token }} - patterns: | - !**/*.go - internal/cli/parse.go - -- key: assert-negations-have-changes - run: | - [ "${{ tasks.test-negations-have-changes.values.have-changes }}" == "true" ] - - echo -n "internal/cli/parse.go" >> expected_changes.txt - expected_changes=$(cat expected_changes.txt) - [ "${{ tasks.test-negations-have-changes.values.changes }}" == "${expected_changes}" ] - -- key: test-one-pattern-has-no-changes - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf - head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 - github-token: ${{ github['rwx-research'].token }} - patterns: "**/*.rb" - -- key: assert-one-pattern-has-no-changes - run: | - [ "${{ tasks.test-one-pattern-has-no-changes.values.has-changes }}" == "false" ] - [ "${{ tasks.test-one-pattern-has-no-changes.values.changes }}" == "" ] - -- key: test-multiple-patterns-have-no-changes - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf - head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 - github-token: ${{ github['rwx-research'].token }} - patterns: | - **/*.rb - Gemfile.lock - -- key: assert-multiple-patterns-have-no-changes - run: | - [ "${{ tasks.test-multiple-patterns-have-no-changes.values.have-changes }}" == "false" ] - [ "${{ tasks.test-multiple-patterns-have-no-changes.values.changes }}" == "" ] - -- key: test-negations-have-no-changes - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf - head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 - github-token: ${{ github['rwx-research'].token }} - patterns: | - internal/cli/parse.go - !**/*.go - -- key: assert-negations-have-no-changes - run: | - [ "${{ tasks.test-negations-have-no-changes.values.have-changes }}" == "false" ] - [ "${{ tasks.test-negations-have-no-changes.values.changes }}" == "" ] - -- key: test-resolves-ref-names - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: main - head-ref: main - github-token: ${{ github['rwx-research'].token }} - patterns: "**/*" - -- key: assert-resolves-ref-names - run: | - [ "${{ tasks.test-resolves-ref-names.values.has-changes }}" == "false" ] - [ "${{ tasks.test-resolves-ref-names.values.changes }}" == "" ] - -- key: test-resolves-refs-with-prefixes - use: github-cli - call: $LEAF_DIGEST - with: - repository: rwx-research/captain - base-ref: refs/heads/main - head-ref: refs/heads/main - github-token: ${{ github['rwx-research'].token }} - patterns: "**/*" - -- key: assert-resolves-refs-with-prefixes - run: | - [ "${{ tasks.test-resolves-refs-with-prefixes.values.has-changes }}" == "false" ] - [ "${{ tasks.test-resolves-refs-with-prefixes.values.changes }}" == "" ] diff --git a/github/compare/rwx-package.yml b/github/compare/rwx-package.yml index a53b3ed0..ee7ceea6 100644 --- a/github/compare/rwx-package.yml +++ b/github/compare/rwx-package.yml @@ -1,5 +1,5 @@ name: github/compare -version: 1.0.6 +version: 1.0.7 description: Compare two git refs in GitHub and check if certain files changed source_code_url: https://github.com/rwx-cloud/packages/tree/main/github/compare issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/github/compare/rwx-test.yml b/github/compare/rwx-test.yml new file mode 100644 index 00000000..2df5fa8d --- /dev/null +++ b/github/compare/rwx-test.yml @@ -0,0 +1,157 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: github-cli + call: github/install-cli 1.0.8 + + - key: test-one-pattern-has-changes + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf + head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 + github-token: ${{ github['rwx-research'].token }} + patterns: "**/*.go" + + - key: assert-one-pattern-has-changes + run: | + [ "${{ tasks.test-one-pattern-has-changes.values.has-changes }}" == "true" ] + + echo "internal/cli/parse.go" >> expected_changes.txt + echo "internal/fs/local.go" >> expected_changes.txt + echo "internal/fs/local_test.go" >> expected_changes.txt + echo -n "test/oss_integration_test.go" >> expected_changes.txt + expected_changes=$(cat expected_changes.txt) + [ "${{ tasks.test-one-pattern-has-changes.values.changes }}" == "${expected_changes}" ] + + - key: test-multiple-patterns-have-changes + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf + head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 + github-token: ${{ github['rwx-research'].token }} + patterns: | + **/*.go + **/*.txt + + - key: assert-multiple-patterns-have-changes + run: | + [ "${{ tasks.test-multiple-patterns-have-changes.values.have-changes }}" == "true" ] + + echo "internal/cli/parse.go" >> expected_changes.txt + echo "internal/fs/local.go" >> expected_changes.txt + echo "internal/fs/local_test.go" >> expected_changes.txt + echo "test/fixtures/filenames/nested/$ @=:+{}[]^><~#|.txt" >> expected_changes.txt + echo "test/fixtures/filenames/nested/**.txt" >> expected_changes.txt + echo "test/fixtures/filenames/nested/*.txt" >> expected_changes.txt + echo "test/fixtures/filenames/nested/?.txt" >> expected_changes.txt + echo "test/fixtures/filenames/nested/[].txt" >> expected_changes.txt + echo "test/fixtures/filenames/nested/\.txt" >> expected_changes.txt + echo -n "test/oss_integration_test.go" >> expected_changes.txt + expected_changes=$(cat expected_changes.txt) + [ "${{ tasks.test-multiple-patterns-have-changes.values.changes }}" == "${expected_changes}" ] + + - key: test-negations-have-changes + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf + head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 + github-token: ${{ github['rwx-research'].token }} + patterns: | + !**/*.go + internal/cli/parse.go + + - key: assert-negations-have-changes + run: | + [ "${{ tasks.test-negations-have-changes.values.have-changes }}" == "true" ] + + echo -n "internal/cli/parse.go" >> expected_changes.txt + expected_changes=$(cat expected_changes.txt) + [ "${{ tasks.test-negations-have-changes.values.changes }}" == "${expected_changes}" ] + + - key: test-one-pattern-has-no-changes + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf + head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 + github-token: ${{ github['rwx-research'].token }} + patterns: "**/*.rb" + + - key: assert-one-pattern-has-no-changes + run: | + [ "${{ tasks.test-one-pattern-has-no-changes.values.has-changes }}" == "false" ] + [ "${{ tasks.test-one-pattern-has-no-changes.values.changes }}" == "" ] + + - key: test-multiple-patterns-have-no-changes + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf + head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 + github-token: ${{ github['rwx-research'].token }} + patterns: | + **/*.rb + Gemfile.lock + + - key: assert-multiple-patterns-have-no-changes + run: | + [ "${{ tasks.test-multiple-patterns-have-no-changes.values.have-changes }}" == "false" ] + [ "${{ tasks.test-multiple-patterns-have-no-changes.values.changes }}" == "" ] + + - key: test-negations-have-no-changes + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: 5294685f36ff0edd7775f685a1e92728d7f223cf + head-ref: 8fe238bebb9276a7fafb83c7ee0513c83fa89061 + github-token: ${{ github['rwx-research'].token }} + patterns: | + internal/cli/parse.go + !**/*.go + + - key: assert-negations-have-no-changes + run: | + [ "${{ tasks.test-negations-have-no-changes.values.have-changes }}" == "false" ] + [ "${{ tasks.test-negations-have-no-changes.values.changes }}" == "" ] + + - key: test-resolves-ref-names + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: main + head-ref: main + github-token: ${{ github['rwx-research'].token }} + patterns: "**/*" + + - key: assert-resolves-ref-names + run: | + [ "${{ tasks.test-resolves-ref-names.values.has-changes }}" == "false" ] + [ "${{ tasks.test-resolves-ref-names.values.changes }}" == "" ] + + - key: test-resolves-refs-with-prefixes + use: github-cli + call: ${{ init.package-digest }} + with: + repository: rwx-research/captain + base-ref: refs/heads/main + head-ref: refs/heads/main + github-token: ${{ github['rwx-research'].token }} + patterns: "**/*" + + - key: assert-resolves-refs-with-prefixes + run: | + [ "${{ tasks.test-resolves-refs-with-prefixes.values.has-changes }}" == "false" ] + [ "${{ tasks.test-resolves-refs-with-prefixes.values.changes }}" == "" ] diff --git a/github/install-cli/README.md b/github/install-cli/README.md index 9bc4cb65..25f53e89 100644 --- a/github/install-cli/README.md +++ b/github/install-cli/README.md @@ -5,5 +5,5 @@ To install the latest version of the GitHub CLI: ```yaml tasks: - key: github-cli - call: github/install-cli 1.0.9 + call: github/install-cli 1.0.10 ``` diff --git a/github/install-cli/rwx-ci-cd.config.yml b/github/install-cli/rwx-ci-cd.config.yml deleted file mode 100644 index 86aa4abf..00000000 --- a/github/install-cli/rwx-ci-cd.config.yml +++ /dev/null @@ -1,28 +0,0 @@ -tests: - - key: ubuntu-22-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-22-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: arm64 - - - key: ubuntu-24-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-24-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: arm64 diff --git a/github/install-cli/rwx-ci-cd.template.yml b/github/install-cli/rwx-ci-cd.template.yml deleted file mode 100644 index e25a9137..00000000 --- a/github/install-cli/rwx-ci-cd.template.yml +++ /dev/null @@ -1,6 +0,0 @@ -- key: github--install-cli--test-default - call: $LEAF_DIGEST -- key: github--install-cli--test-default--assert - use: github--install-cli--test-default - run: gh --version | grep 'gh version' - diff --git a/github/install-cli/rwx-package.yml b/github/install-cli/rwx-package.yml index cca077c4..1f9b5806 100644 --- a/github/install-cli/rwx-package.yml +++ b/github/install-cli/rwx-package.yml @@ -1,5 +1,5 @@ name: github/install-cli -version: 1.0.9 +version: 1.0.10 description: Install the GitHub CLI, gh. It is GitHub on the command line. source_code_url: https://github.com/rwx-cloud/packages/tree/main/github/install-cli issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/github/install-cli/rwx-test-base.json b/github/install-cli/rwx-test-base.json new file mode 100644 index 00000000..093a55cc --- /dev/null +++ b/github/install-cli/rwx-test-base.json @@ -0,0 +1,22 @@ +[ + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + } +] diff --git a/github/install-cli/rwx-test.yml b/github/install-cli/rwx-test.yml new file mode 100644 index 00000000..aef2cae8 --- /dev/null +++ b/github/install-cli/rwx-test.yml @@ -0,0 +1,13 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: test-default + call: ${{ init.package-digest }} + + - key: test-default--assert + use: test-default + run: gh --version | grep 'gh version' + diff --git a/golang/mod-download/README.md b/golang/mod-download/README.md index 84048a79..f724f012 100644 --- a/golang/mod-download/README.md +++ b/golang/mod-download/README.md @@ -23,7 +23,7 @@ tasks: - key: go-modules use: [go, code] - call: golang/mod-download 1.0.0 + call: golang/mod-download 1.0.1 filter: [go.mod, go.sum] with: tool-cache: my-repo-go-modules @@ -38,7 +38,7 @@ If your Go project is not in the workspace root, you can specify a path: ```yaml - key: go-modules use: [go, code] - call: golang/mod-download 1.0.0 + call: golang/mod-download 1.0.1 filter: [path/to/go.mod, path/to/go.sum] with: path: path/to diff --git a/golang/mod-download/rwx-ci-cd.config.yml b/golang/mod-download/rwx-ci-cd.config.yml deleted file mode 100644 index 86aa4abf..00000000 --- a/golang/mod-download/rwx-ci-cd.config.yml +++ /dev/null @@ -1,28 +0,0 @@ -tests: - - key: ubuntu-22-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-22-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:22.04 - config: rwx/base 1.0.0 - arch: arm64 - - - key: ubuntu-24-04-x86-64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: x86_64 - - - key: ubuntu-24-04-arm64 - template: rwx-ci-cd.template.yml - base: - image: ubuntu:24.04 - config: rwx/base 1.0.0 - arch: arm64 diff --git a/golang/mod-download/rwx-ci-cd.template.yml b/golang/mod-download/rwx-ci-cd.template.yml deleted file mode 100644 index 0cf7f7cb..00000000 --- a/golang/mod-download/rwx-ci-cd.template.yml +++ /dev/null @@ -1,179 +0,0 @@ -- key: go-1-20 - call: golang/install 1.2.0 - with: - go-version: "1.20" - -- key: go-1-21 - call: golang/install 1.2.0 - with: - go-version: "1.21" - -- key: go-1-22 - call: golang/install 1.2.0 - with: - go-version: "1.22" - -- key: go-1-23 - call: golang/install 1.2.0 - with: - go-version: "1.23" - -- key: go-1-24 - call: golang/install 1.2.0 - with: - go-version: "1.24" - -- key: go-1-25 - call: golang/install 1.2.0 - with: - go-version: "1.25" - -- key: code-1-20 - run: | - cat > go.mod << 'EOF' - module test - - go 1.20 - - require golang.org/x/text v0.21.0 - EOF - cat > go.sum << 'EOF' - golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= - golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= - EOF - -- key: code-1-21 - run: | - cat > go.mod << 'EOF' - module test - - go 1.21 - - require golang.org/x/text v0.21.0 - EOF - cat > go.sum << 'EOF' - golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= - golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= - EOF - -- key: code-1-22 - run: | - cat > go.mod << 'EOF' - module test - - go 1.22 - - require golang.org/x/text v0.21.0 - EOF - cat > go.sum << 'EOF' - golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= - golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= - EOF - -- key: code-1-23 - run: | - cat > go.mod << 'EOF' - module test - - go 1.23 - - require golang.org/x/text v0.21.0 - EOF - cat > go.sum << 'EOF' - golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= - golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= - EOF - -- key: code-1-24 - run: | - cat > go.mod << 'EOF' - module test - - go 1.24 - - require golang.org/x/text v0.21.0 - EOF - cat > go.sum << 'EOF' - golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= - golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= - EOF - -- key: code-1-25 - run: | - cat > go.mod << 'EOF' - module test - - go 1.25 - - require golang.org/x/text v0.21.0 - EOF - cat > go.sum << 'EOF' - golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= - golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= - EOF - -- key: mod-download--test-go-1-20 - use: [go-1-20, code-1-20] - call: $LEAF_DIGEST - with: - tool-cache: golang-mod-download-1-20 - -- key: mod-download--test-go-1-20--assert - use: mod-download--test-go-1-20 - run: | - test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" - -- key: mod-download--test-go-1-21 - use: [go-1-21, code-1-21] - call: $LEAF_DIGEST - with: - tool-cache: golang-mod-download-1-21 - -- key: mod-download--test-go-1-21--assert - use: mod-download--test-go-1-21 - run: | - test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" - -- key: mod-download--test-go-1-22 - use: [go-1-22, code-1-22] - call: $LEAF_DIGEST - with: - tool-cache: golang-mod-download-1-22 - -- key: mod-download--test-go-1-22--assert - use: mod-download--test-go-1-22 - run: | - test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" - -- key: mod-download--test-go-1-23 - use: [go-1-23, code-1-23] - call: $LEAF_DIGEST - with: - tool-cache: golang-mod-download-1-23 - -- key: mod-download--test-go-1-23--assert - use: mod-download--test-go-1-23 - run: | - test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" - -- key: mod-download--test-go-1-24 - use: [go-1-24, code-1-24] - call: $LEAF_DIGEST - with: - tool-cache: golang-mod-download-1-24 - -- key: mod-download--test-go-1-24--assert - use: mod-download--test-go-1-24 - run: | - test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" - -- key: mod-download--test-go-1-25 - use: [go-1-25, code-1-25] - call: $LEAF_DIGEST - with: - tool-cache: golang-mod-download-1-25 - -- key: mod-download--test-go-1-25--assert - use: mod-download--test-go-1-25 - run: | - test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" diff --git a/golang/mod-download/rwx-package.yml b/golang/mod-download/rwx-package.yml index ec521498..f92934d2 100644 --- a/golang/mod-download/rwx-package.yml +++ b/golang/mod-download/rwx-package.yml @@ -1,5 +1,5 @@ name: golang/mod-download -version: 1.0.0 +version: 1.0.1 description: Downloads and caches all of your Go modules without requiring your source code source_code_url: https://github.com/rwx-cloud/packages/tree/main/golang/mod-download issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/golang/mod-download/rwx-test-base.json b/golang/mod-download/rwx-test-base.json new file mode 100644 index 00000000..093a55cc --- /dev/null +++ b/golang/mod-download/rwx-test-base.json @@ -0,0 +1,22 @@ +[ + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:22.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "x86_64" + }, + { + "image": "ubuntu:24.04", + "config": "rwx/base 1.0.0", + "arch": "arm64" + } +] diff --git a/golang/mod-download/rwx-test.yml b/golang/mod-download/rwx-test.yml new file mode 100644 index 00000000..847ddc1b --- /dev/null +++ b/golang/mod-download/rwx-test.yml @@ -0,0 +1,185 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: go-1-20 + call: golang/install 1.2.0 + with: + go-version: "1.20" + + - key: go-1-21 + call: golang/install 1.2.0 + with: + go-version: "1.21" + + - key: go-1-22 + call: golang/install 1.2.0 + with: + go-version: "1.22" + + - key: go-1-23 + call: golang/install 1.2.0 + with: + go-version: "1.23" + + - key: go-1-24 + call: golang/install 1.2.0 + with: + go-version: "1.24" + + - key: go-1-25 + call: golang/install 1.2.0 + with: + go-version: "1.25" + + - key: code-1-20 + run: | + cat > go.mod << 'EOF' + module test + + go 1.20 + + require golang.org/x/text v0.21.0 + EOF + cat > go.sum << 'EOF' + golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= + golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= + EOF + + - key: code-1-21 + run: | + cat > go.mod << 'EOF' + module test + + go 1.21 + + require golang.org/x/text v0.21.0 + EOF + cat > go.sum << 'EOF' + golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= + golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= + EOF + + - key: code-1-22 + run: | + cat > go.mod << 'EOF' + module test + + go 1.22 + + require golang.org/x/text v0.21.0 + EOF + cat > go.sum << 'EOF' + golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= + golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= + EOF + + - key: code-1-23 + run: | + cat > go.mod << 'EOF' + module test + + go 1.23 + + require golang.org/x/text v0.21.0 + EOF + cat > go.sum << 'EOF' + golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= + golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= + EOF + + - key: code-1-24 + run: | + cat > go.mod << 'EOF' + module test + + go 1.24 + + require golang.org/x/text v0.21.0 + EOF + cat > go.sum << 'EOF' + golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= + golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= + EOF + + - key: code-1-25 + run: | + cat > go.mod << 'EOF' + module test + + go 1.25 + + require golang.org/x/text v0.21.0 + EOF + cat > go.sum << 'EOF' + golang.org/x/text v0.21.0 h1:L8rBOAiSsKbhCdtrCy+Yj8hCg8RypYCqPGfX89WFQY= + golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= + EOF + + - key: mod-download--test-go-1-20 + use: [go-1-20, code-1-20] + call: ${{ init.package-digest }} + with: + tool-cache: golang-mod-download-1-20 + + - key: mod-download--test-go-1-20--assert + use: mod-download--test-go-1-20 + run: | + test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" + + - key: mod-download--test-go-1-21 + use: [go-1-21, code-1-21] + call: ${{ init.package-digest }} + with: + tool-cache: golang-mod-download-1-21 + + - key: mod-download--test-go-1-21--assert + use: mod-download--test-go-1-21 + run: | + test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" + + - key: mod-download--test-go-1-22 + use: [go-1-22, code-1-22] + call: ${{ init.package-digest }} + with: + tool-cache: golang-mod-download-1-22 + + - key: mod-download--test-go-1-22--assert + use: mod-download--test-go-1-22 + run: | + test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" + + - key: mod-download--test-go-1-23 + use: [go-1-23, code-1-23] + call: ${{ init.package-digest }} + with: + tool-cache: golang-mod-download-1-23 + + - key: mod-download--test-go-1-23--assert + use: mod-download--test-go-1-23 + run: | + test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" + + - key: mod-download--test-go-1-24 + use: [go-1-24, code-1-24] + call: ${{ init.package-digest }} + with: + tool-cache: golang-mod-download-1-24 + + - key: mod-download--test-go-1-24--assert + use: mod-download--test-go-1-24 + run: | + test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" + + - key: mod-download--test-go-1-25 + use: [go-1-25, code-1-25] + call: ${{ init.package-digest }} + with: + tool-cache: golang-mod-download-1-25 + + - key: mod-download--test-go-1-25--assert + use: mod-download--test-go-1-25 + run: | + test -d "$(go env GOMODCACHE)/golang.org/x/text@v0.21.0" diff --git a/google-cloud/install-cli/README.md b/google-cloud/install-cli/README.md index c714a2ab..0d9a9d32 100644 --- a/google-cloud/install-cli/README.md +++ b/google-cloud/install-cli/README.md @@ -5,7 +5,7 @@ To install the latest version of the Google Cloud CLI: ```yaml tasks: - key: gcloud-cli - call: google-cloud/install-cli 1.1.6 + call: google-cloud/install-cli 1.1.7 ``` To install a specific version of the Google Cloud CLI: @@ -13,7 +13,7 @@ To install a specific version of the Google Cloud CLI: ```yaml tasks: - key: gcloud-cli - call: google-cloud/install-cli 1.1.6 + call: google-cloud/install-cli 1.1.7 with: cli-version: "465.0.0" ``` diff --git a/google-cloud/install-cli/rwx-ci-cd.template.yml b/google-cloud/install-cli/rwx-ci-cd.template.yml deleted file mode 100644 index 5582c041..00000000 --- a/google-cloud/install-cli/rwx-ci-cd.template.yml +++ /dev/null @@ -1,25 +0,0 @@ -- key: google-cloud--install-cli--test-default - call: $LEAF_DIGEST -- key: google-cloud--install-cli--test-default--assert - use: google-cloud--install-cli--test-default - run: gcloud --version | grep '^Google Cloud SDK [0-9.]\+$' - -- key: google-cloud--install-cli--test-specified - call: $LEAF_DIGEST - with: - cli-version: "462.0.1" -- key: google-cloud--install-cli--test-specified--assert - use: google-cloud--install-cli--test-specified - run: gcloud --version | grep '^Google Cloud SDK 462.0.1$' - -- key: google-cloud--install-cli--test-components - call: $LEAF_DIGEST - with: - components: "bigtable cloud-sql-proxy" -- key: google-cloud--install-cli--test-components--assert - use: google-cloud--install-cli--test-components - run: | - component_output=$(gcloud components list --only-local-state) - echo "$component_output" - echo "$component_output" | grep 'bigtable' - echo "$component_output" | grep 'cloud-sql-proxy' diff --git a/google-cloud/install-cli/rwx-package.yml b/google-cloud/install-cli/rwx-package.yml index ed2f8da7..70fd6d7f 100644 --- a/google-cloud/install-cli/rwx-package.yml +++ b/google-cloud/install-cli/rwx-package.yml @@ -1,5 +1,5 @@ name: google-cloud/install-cli -version: 1.1.6 +version: 1.1.7 description: Install the Google Cloud SDK CLI source_code_url: https://github.com/rwx-cloud/packages/tree/main/google-cloud/install-cli issue_tracker_url: https://github.com/rwx-cloud/packages/issues diff --git a/google-cloud/install-cli/rwx-test.yml b/google-cloud/install-cli/rwx-test.yml new file mode 100644 index 00000000..7d19eda4 --- /dev/null +++ b/google-cloud/install-cli/rwx-test.yml @@ -0,0 +1,32 @@ +base: + image: ${{ init.base-image }} + config: ${{ init.base-config }} + arch: ${{ init.base-arch }} + +tasks: + - key: test-default + call: ${{ init.package-digest }} + + - key: test-default--assert + use: test-default + run: gcloud --version | grep '^Google Cloud SDK [0-9.]\+$' + + - key: test-specified + call: ${{ init.package-digest }} + with: + cli-version: "462.0.1" + - key: test-specified--assert + use: test-specified + run: gcloud --version | grep '^Google Cloud SDK 462.0.1$' + + - key: test-components + call: ${{ init.package-digest }} + with: + components: "bigtable cloud-sql-proxy" + - key: test-components--assert + use: test-components + run: | + component_output=$(gcloud components list --only-local-state) + echo "$component_output" + echo "$component_output" | grep 'bigtable' + echo "$component_output" | grep 'cloud-sql-proxy'