PCD Building and testing applications • Complete Question Bank
Complete PCD Building and testing applications question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
{
"bindings": [
{
"role": "roles/cloudbuild.builds.builder",
"members": [
"serviceAccount:build-sa@my-project.iam.gserviceaccount.com"
]
}
]
}Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Frequently accessed data
Data accessed less than once a month
Data accessed less than once a quarter
Long-term archival data accessed less than once a year
Automatic transition between classes based on access patterns
Drag a concept onto its matching description — or click a concept then click the description.
Manage Google Cloud resources
Interact with Cloud Storage
Run BigQuery queries and manage datasets
Manage Kubernetes clusters
Continuous development for Kubernetes applications
Refer to the exhibit. ```yaml steps: - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'us-central1-docker.pkg.dev/my-project/my-repo/my-image:latest', '.'] - name: 'gcr.io/cloud-builders/docker' args: ['push', 'us-central1-docker.pkg.dev/my-project/my-repo/my-image:latest'] images: ['us-central1-docker.pkg.dev/my-project/my-repo/my-image:latest'] ```
Refer to the exhibit. ``` Function execution started Function execution took 120 ms, finished with status: 'connection error' Error: 3 INVALID_ARGUMENT: Request contains an invalid argument ```
gcloud run deploy my-service \ --image gcr.io/my-project/my-image:latest \ --platform managed \ --region us-central1 \ --concurrency 80 \ --cpu 2 \ --memory 4Gi \ --execution-environment gen2
apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
name: my-pipeline
location: us-central1
serialPipeline:
stages:
- targetId: dev
strategy:
canary:
canaryDeployment:
percentages: [25, 50, 75, 100]
- targetId: prod
strategy:
canary:
canaryDeployment:
percentages: [10, 20, 60, 100]Cloud Function code (index.js):
const {Firestore} = require('@google-cloud/firestore');
const firestore = new Firestore();
exports.updateDocument = async (req, res) => {
const docId = req.query.id;
if (!docId) {
res.status(400).send('Missing id');
return;
}
const docRef = firestore.doc(`collection/${docId}`);
try {
await docRef.update({ timestamp: new Date().toISOString() });
res.status(200).send('Updated');
} catch (error) {
console.error(error);
res.status(500).send('Error');
}
};steps: - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$MY_PROJECT/my-image', '.'] - name: 'gcr.io/cloud-builders/docker' args: ['push', 'gcr.io/$MY_PROJECT/my-image']