cron #696
This file contains 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
env: | |
ALT_AWS_ACCESS_KEY_ID: ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} | |
ALT_AWS_SECRET_ACCESS_KEY: ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} | |
ALT_AWS_PROFILE: ${{ secrets.ALT_AWS_PROFILE }} | |
AWS_REGION: us-west-2 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GOLANGCI_LINT_VERSION: v1.59.0 | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} | |
PROVIDER: eks | |
PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
PULUMI_API: https://api.pulumi-staging.io | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
PYPI_USERNAME: __token__ | |
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} | |
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} | |
PULUMI_ENABLE_RESOURCE_REFERENCES: 1 | |
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget | |
GOVERSION: "1.21.x" | |
DOTNETVERSION: "6.x" | |
PYTHONVERSION: "3.8" | |
NODEVERSION: "18.x" | |
JAVAVERSION: "11" | |
jobs: | |
lint: | |
name: Lint and unit test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@v1.11.0 | |
with: | |
repo: pulumi/pulumictl | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODEVERSION }} | |
registry-url: https://registry.npmjs.org | |
- name: Install Yarn | |
run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0 | |
- name: Update PATH for Yarn | |
run: | | |
echo "$HOME/.yarn/bin" >> $GITHUB_PATH | |
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH | |
- name: Run nodejs linter | |
run: make lint | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: ${{ env.GOLANGCI_LINT_VERSION }} | |
args: -c ../.golangci.yml | |
working-directory: provider | |
- name: Run unit tests | |
run: make test_unit_tests | |
prerequisites: | |
name: prerequisites | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Checkout Scripts Repo | |
uses: actions/checkout@v2 | |
with: | |
path: ci-scripts | |
repository: pulumi/scripts | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GOVERSION }} | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@v1.11.0 | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi CLI | |
uses: pulumi/actions@v5 | |
- name: Build provider binary + schema | |
run: make schema provider | |
- name: Check worktree clean | |
run: ./ci-scripts/ci/check-worktree-is-clean | |
- name: Tar provider binaries | |
run: | |
tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace | |
}}/bin/ pulumi-resource-${{ env.PROVIDER }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.PROVIDER }}-provider.tar.gz | |
path: ${{ github.workspace }}/bin/provider.tar.gz | |
- if: failure() && github.event_name == 'push' | |
name: Notify Slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
author_name: Failure in building provider prerequisites | |
fields: repo,commit,author,action | |
status: ${{ job.status }} | |
strategy: | |
fail-fast: true | |
build_sdk: | |
name: build_sdk | |
runs-on: ubuntu-latest | |
needs: prerequisites | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Checkout Scripts Repo | |
uses: actions/checkout@v2 | |
with: | |
path: ci-scripts | |
repository: pulumi/scripts | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GOVERSION }} | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@v1.11.0 | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi CLI | |
uses: pulumi/actions@v5 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHONVERSION }} | |
- name: Setup DotNet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNETVERSION }} | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODEVERSION }} | |
registry-url: https://registry.npmjs.org | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
cache: gradle | |
distribution: temurin | |
java-version: ${{ env.JAVAVERSION }} | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: "7.6" | |
- name: Install Yarn | |
run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0 | |
- name: Update PATH for Yarn | |
run: | | |
echo "$HOME/.yarn/bin" >> $GITHUB_PATH | |
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH | |
- name: Build SDK | |
run: make build_${{ matrix.language }} | |
- name: Check worktree clean | |
run: ./ci-scripts/ci/check-worktree-is-clean | |
- name: Compress NodeJS SDK folder | |
if: matrix.language == 'nodejs' | |
run: tar -zcf ${{ matrix.language }}.tar.gz -C ${{ matrix.language }}/ . | |
- name: Upload NodeJS artifacts | |
if: matrix.language == 'nodejs' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.language }}-sdk.tar.gz | |
path: ${{ github.workspace}}/${{ matrix.language }}.tar.gz | |
- name: Compress Other Lang SDK folder | |
if: matrix.language != 'nodejs' | |
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }}/ . | |
- name: Upload Other Lang artifacts | |
if: matrix.language != 'nodejs' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.language }}-sdk.tar.gz | |
path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz | |
strategy: | |
fail-fast: true | |
matrix: | |
language: | |
- nodejs | |
- python | |
- dotnet | |
- java | |
test-nodejs: | |
name: Run NodeJS Tests | |
needs: build_sdk | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Checkout Scripts Repo | |
uses: actions/checkout@v2 | |
with: | |
path: ci-scripts | |
repository: pulumi/scripts | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GOVERSION }} | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHONVERSION }} | |
- name: Install awscli | |
run: | | |
python -m pip install --upgrade pip | |
pip install awscli --upgrade | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@v1.11.0 | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi CLI | |
uses: pulumi/actions@v5 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODEVERSION }} | |
registry-url: https://registry.npmjs.org | |
- name: Download provider binary | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ env.PROVIDER }}-provider.tar.gz | |
path: ${{ github.workspace }}/bin | |
- name: Untar provider binaries | |
run: | |
tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace | |
}}/bin | |
- name: Restore binary perms | |
run: | |
find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print | |
-exec chmod +x {} \; | |
- name: Update path | |
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- name: Download SDK | |
uses: actions/download-artifact@v2 | |
with: | |
name: nodejs-sdk.tar.gz | |
path: ${{ github.workspace}} | |
- name: Uncompress SDK folder | |
run: tar -zxf ${{ github.workspace}}/nodejs.tar.gz -C ${{github.workspace}}/nodejs | |
- name: Install dependencies | |
run: make install_nodejs_sdk | |
- name: Install gotestfmt | |
uses: GoTestTools/gotestfmt-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: v2.4.0 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-region: ${{ env.AWS_REGION }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
role-duration-seconds: 7200 | |
role-session-name: ${{ env.PROVIDER }}@githubActions | |
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} | |
- name: Configure AWS CLI | |
run: | | |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }} | |
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }} | |
- name: Link nodejs binary for testing | |
run: | | |
cd ${{ github.workspace }}/bin | |
yarn install && yarn link @pulumi/eks | |
- name: Run tests | |
run: make specific_test TestName=${{ matrix.test-name }} LanguageTags=nodejs | |
strategy: | |
fail-fast: false | |
matrix: | |
test-name: | |
- AwsProfile | |
- AuthenticationMode | |
- Cluster | |
- CNIAcrossUpdates | |
- EncryptionProvider | |
- ExtraSecurityGroups | |
- Fargate | |
- ImportDefaultEksSecgroup | |
- KubernetesServiceIPv4RangeForCluster | |
- ManagedNodeGroup | |
- MigrateNodeGroups | |
- MNG_withAwsAuth | |
- MNG_withMissingRole | |
- NodeGroup | |
- NodegroupOptions | |
- OidcIam | |
- ReplaceClusterAddSubnets | |
- ReplaceSecGroup | |
- ScopedKubeconfig | |
- StorageClasses | |
- TagInputTypes | |
- Tags | |
- VpcSubnetTags | |
test-python: | |
name: Run Python Tests | |
needs: build_sdk | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Checkout Scripts Repo | |
uses: actions/checkout@v2 | |
with: | |
path: ci-scripts | |
repository: pulumi/scripts | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GOVERSION }} | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@v1.11.0 | |
with: | |
repo: pulumi/pulumictl | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHONVERSION }} | |
- name: Install awscli | |
run: | | |
python -m pip install --upgrade pip | |
pip install awscli --upgrade | |
- name: Install Pulumi CLI | |
uses: pulumi/actions@v5 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODEVERSION }} | |
registry-url: https://registry.npmjs.org | |
- name: Install Python deps | |
run: |- | |
pip3 install virtualenv==20.0.23 | |
pip3 install pipenv | |
- name: Download provider binary | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ env.PROVIDER }}-provider.tar.gz | |
path: ${{ github.workspace }}/bin | |
- name: Untar provider binaries | |
run: | |
tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace | |
}}/bin | |
- name: Restore binary perms | |
run: | |
find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print | |
-exec chmod +x {} \; | |
- name: Update path | |
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- name: Download NodeJS SDK | |
uses: actions/download-artifact@v2 | |
with: | |
name: nodejs-sdk.tar.gz | |
path: ${{ github.workspace}} | |
- name: Uncompress NodeJS SDK folder | |
run: tar -zxf ${{ github.workspace}}/nodejs.tar.gz -C ${{github.workspace}}/nodejs | |
- name: Install NodeJS SDK | |
run: make install_nodejs_sdk | |
- name: Download Python SDK | |
uses: actions/download-artifact@v2 | |
with: | |
name: python-sdk.tar.gz | |
path: ${{ github.workspace}}/sdk/ | |
- name: Uncompress Python SDK folder | |
run: tar -zxf ${{ github.workspace}}/sdk/python.tar.gz -C ${{github.workspace}}/sdk/python | |
- name: Install dependencies | |
run: make install_python_sdk | |
- name: Install gotestfmt | |
uses: GoTestTools/gotestfmt-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: v2.4.0 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-region: ${{ env.AWS_REGION }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
role-duration-seconds: 7200 | |
role-session-name: ${{ env.PROVIDER }}@githubActions | |
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} | |
- name: Configure AWS CLI | |
run: | | |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }} | |
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }} | |
- name: Link nodejs binary for testing | |
run: | | |
cd ${{ github.workspace }}/bin | |
yarn install && yarn link @pulumi/eks | |
- name: Run tests | |
run: make specific_test TestName=${{ matrix.test-name }} LanguageTags=python | |
strategy: | |
fail-fast: false | |
matrix: | |
test-name: | |
- AwsProfilePy | |
- AwsProfileRolePy | |
- ClusterPy | |
- FargatePy | |
- NodeGroupPy | |
- ManagedNodeGroupPy | |
test-dotnet: | |
name: Run DotNet Tests | |
needs: build_sdk | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Checkout Scripts Repo | |
uses: actions/checkout@v2 | |
with: | |
path: ci-scripts | |
repository: pulumi/scripts | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GOVERSION }} | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHONVERSION }} | |
- name: Install awscli | |
run: | | |
python -m pip install --upgrade pip | |
pip install awscli --upgrade | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@v1.11.0 | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi CLI | |
uses: pulumi/actions@v5 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODEVERSION }} | |
registry-url: https://registry.npmjs.org | |
- name: Setup DotNet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNETVERSION }} | |
- name: Download provider binary | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ env.PROVIDER }}-provider.tar.gz | |
path: ${{ github.workspace }}/bin | |
- name: Untar provider binaries | |
run: | |
tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace | |
}}/bin | |
- name: Restore binary perms | |
run: | |
find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print | |
-exec chmod +x {} \; | |
- name: Update path | |
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- name: Download NodeJS SDK | |
uses: actions/download-artifact@v2 | |
with: | |
name: nodejs-sdk.tar.gz | |
path: ${{ github.workspace}} | |
- name: Uncompress NodeJS SDK folder | |
run: tar -zxf ${{ github.workspace}}/nodejs.tar.gz -C ${{github.workspace}}/nodejs | |
- name: Install NodeJS SDK | |
run: make install_nodejs_sdk | |
- name: Download DotNet SDK | |
uses: actions/download-artifact@v2 | |
with: | |
name: dotnet-sdk.tar.gz | |
path: ${{ github.workspace}}/sdk/ | |
- name: Uncompress DotNet SDK folder | |
run: tar -zxf ${{ github.workspace}}/sdk/dotnet.tar.gz -C ${{github.workspace}}/sdk/dotnet | |
- name: Install dependencies | |
run: make install_dotnet_sdk | |
- name: Install gotestfmt | |
uses: GoTestTools/gotestfmt-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: v2.4.0 | |
- run: dotnet nuget add source ${{ github.workspace }}/nuget | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-region: ${{ env.AWS_REGION }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
role-duration-seconds: 7200 | |
role-session-name: ${{ env.PROVIDER }}@githubActions | |
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} | |
- name: Configure AWS CLI | |
run: | | |
aws configure set default.aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws configure set default.aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws configure set aws_access_key_id ${{ secrets.ALT_AWS_ACCESS_KEY_ID }} --profile ${{ secrets.ALT_AWS_PROFILE }} | |
aws configure set aws_secret_access_key ${{ secrets.ALT_AWS_SECRET_ACCESS_KEY }} --profile ${{ secrets.ALT_AWS_PROFILE }} | |
- name: Link nodejs binary for testing | |
run: | | |
cd ${{ github.workspace }}/bin | |
yarn install && yarn link @pulumi/eks | |
- name: Run tests | |
run: make specific_test TestName=${{ matrix.test-name }} LanguageTags=dotnet | |
strategy: | |
fail-fast: false | |
matrix: | |
test-name: | |
- ClusterCs | |
name: cron | |
"on": | |
schedule: | |
# Run every day at 06:00AM UTC | |
- cron: "0 6 * * *" |