-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add build caching #14
base: main
Are you sure you want to change the base?
Conversation
@@ -33,23 +36,29 @@ inputs: | |||
runs: | |||
using: "composite" | |||
steps: | |||
# Need buildx for caching | |||
- name: Set up Docker Buildx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
build-frontend/action.yml
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
build-frontend/action.yml
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're passing the build args this way, I guess that we don't have to declare the envs
key below.
build-frontend/action.yml
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we by default compute the value? It should be like:
${{ inputs.project_name }}-storefrontcloud-io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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