Feature: add build caching#14
Conversation
| using: "composite" | ||
| steps: | ||
| # Need buildx for caching | ||
| - name: Set up Docker Buildx |
There was a problem hiding this comment.
need to define buildx before caching happens
| customHeaders: '{"Content-Type":"application/json"}' | ||
| data: '{ "middleware":true, "cloudUserId":"${{ inputs.cloud_username }}", "cloudUserPassword":"${{ inputs.cloud_password }}", "dockerImageHash":"${{ inputs.version || github.sha }}", "middlewareData":{ "path":"/api/", "port":4000, "has_base_path":false } }' | ||
| timeout: 60000 | ||
| - name: Deploy on ${{ inputs.project_name }}.${{ inputs.cloud_region }}.gcp.storefrontcloud.io |
There was a problem hiding this comment.
i changed this because this code is what the SA's are familiar with. What do you think?
There was a problem hiding this comment.
Deployments must be triggered via the Console API. The firing it through the Farmer is a deprecated way.
There was a problem hiding this comment.
Triggering it via Farmer, erases the environment variables and there's lack of deployment markers in the Console — so part of their functionality is broken.
| NUXT_PUBLIC_MULTISTORE_ENABLED: ${{ inputs.multistore_enabled }} | ||
| NUXT_IMAGE_PROVIDER: ${{ inputs.image_provider }} | ||
| NUXT_PUBLIC_IMAGE_LOADER_UPLOAD_URL: ${{ inputs.image_provider_upload_url }} | ||
| NUXT_PUBLIC_IMAGE_LOADER_FETCH_URL: ${{ inputs.image_provider_fetch_url }} | ||
| NUXT_PUBLIC_COVEO_ORGANIZATION_ID: ${{ inputs.coveo_organization_id }} | ||
| NUXT_PUBLIC_COVEO_ACCESS_TOKEN: ${{ inputs.coveo_access_token }} |
There was a problem hiding this comment.
Until we release the upgrade to the Next 14 & App Router, those env variables must stay for both of the frontends - we would rather not introduce the differences between them in the deployment
| NPM_EMAIL=${{ inputs.npm_email }} | ||
| NPM_PASS=${{ inputs.npm_pass }} | ||
| NPM_USER=${{ inputs.npm_user }} | ||
| NPM_REGISTRY=https://registrynpm.storefrontcloud.io | ||
| NUXT_PUBLIC_API_BASE_URL: https://${{ inputs.project_name }}.${{ inputs.cloud_region }}.gcp.storefrontcloud.io/api/ |
There was a problem hiding this comment.
If we're passing the build args this way, I guess that we don't have to declare the envs key below.
| context: . | ||
| file: .vuestorefrontcloud/docker/nuxtjs/Dockerfile-frontend | ||
| push: true | ||
| tags: ${{ inputs.docker_registry_ref }}/vue-storefront:${{ github.sha }} |
There was a problem hiding this comment.
Here we need a space for custom versioning: ${{ inputs.version || github.sha }}
| required: false | ||
| default: 'registry.vuestorefront.cloud' | ||
| default: "registry.storefrontcloud.io" | ||
| docker_registry_ref: |
There was a problem hiding this comment.
Can't we by default compute the value? It should be like:
${{ inputs.project_name }}-storefrontcloud-io
There was a problem hiding this comment.
it won't build if i use this change unfortunately. i can't seem to reference inputs within the inputs section of this file. it has to be hard coded.
However within the codebase the continuous-delivery.yml file looks like this
docker_registry_ref: ${{ env.DOCKER_REGISTRY_URL }}/${{ env.CUSTOMER_NAME }}-storefrontcloud-io
| customHeaders: '{"Content-Type":"application/json"}' | ||
| data: '{ "middleware":true, "cloudUserId":"${{ inputs.cloud_username }}", "cloudUserPassword":"${{ inputs.cloud_password }}", "dockerImageHash":"${{ inputs.version || github.sha }}", "middlewareData":{ "path":"/api/", "port":4000, "has_base_path":false } }' | ||
| timeout: 60000 | ||
| - name: Deploy on ${{ inputs.project_name }}.${{ inputs.cloud_region }}.gcp.storefrontcloud.io |
There was a problem hiding this comment.
Deployments must be triggered via the Console API. The firing it through the Farmer is a deprecated way.
| customHeaders: '{"Content-Type":"application/json"}' | ||
| data: '{ "middleware":true, "cloudUserId":"${{ inputs.cloud_username }}", "cloudUserPassword":"${{ inputs.cloud_password }}", "dockerImageHash":"${{ inputs.version || github.sha }}", "middlewareData":{ "path":"/api/", "port":4000, "has_base_path":false } }' | ||
| timeout: 60000 | ||
| - name: Deploy on ${{ inputs.project_name }}.${{ inputs.cloud_region }}.gcp.storefrontcloud.io |
There was a problem hiding this comment.
Triggering it via Farmer, erases the environment variables and there's lack of deployment markers in the Console — so part of their functionality is broken.
Here is what my continuous delivery file looks like
🔗 Linked issue
❓ Type of change
📚 Description
📝 Checklist