Hi, all, when I run below gitlab CI I get this err...
# getting-started
s
Hi, all, when I run below gitlab CI I get this error. Any tips where the problem might be ?
Copy code
Previewing update (dev):
error: could not load plugin for gcp provider 'urn:pulumi:dev::xxxx::pulumi:providers:gcp::default': Could not automatically download and install resource plugin 'pulumi-resource-gcp', install the plugin using `pulumi plugin install resource gcp`.
Underlying error: 401 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-gcp/releases/latest>
If I add
pulumi plugin install resource gcp
I get:
error: 401 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-gcp/releases/latest>
Copy code
default:
    image: pulumi/pulumi:latest
  
  stages:
    - deploy-preview
    - deploy-update
  
  deploy-preview:
    stage: deploy-preview
    rules:
      - if: $CI_COMMIT_BANCH == "dev"
      - if: $CI_PIPELINE_SOURCE == "push"
        when: always
    script:
      - export PULUMI_CONFIG_PASSPHRASE=""
      - pulumi login <gs://xxxxxxxxxx>
      - pulumi stack select ${CI_COMMIT_BRANCH}
      - pulumi config set gcp:project xxxxxxxxxx
      - pulumi config set gcp:region xxxxxxxxxx
      - pulumi preview
  
  deploy-update:
    stage: deploy-update
    rules:
      - if: $CI_COMMIT_BANCH == "dev"
      - if: $CI_PIPELINE_SOURCE == "push"
        when: manual
    script:
      - export PULUMI_CONFIG_PASSPHRASE=""
      - pulumi login <gs://xxxxxxxxxx>
      - pulumi stack select ${CI_COMMIT_BRANCH}
      - pulumi config set gcp:project xxxxxxxxxx
      - pulumi config set gcp:region xxxxxxxxxx
      - pulumi update --yes
r
@straight-fireman-55591 I've also been having 403 from github api, we solved it by adding
pulumi plugin install <pluginname>
as the first line in the CI script
s
thanks, I fixed it by adding
Copy code
- export GITHUB_TOKEN=${PULUMI_TOKEN_GITHUB}