Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-19405

docker build copy failed . should be copy form /opt/atlassian/pipelines/agent/build/dist to dst dir,but copy from /var/lib/docker/165536.165536/tmp/docker-builder198574421/dist

      docker build copy failed . should be copy form /opt/atlassian/pipelines/agent/build/dist to dst dir,but copy from /var/lib/docker/165536.165536/tmp/docker-builder198574421/dist

      below is pipelines log

      • umask 000
      • GIT_LFS_SKIP_SMUDGE=1 git clone --branch="develop" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
        Cloning into '/opt/atlassian/pipelines/agent/build'...
      • git reset --hard f9f8057b8548410415cc52a0da159c1ac009a2ad
        HEAD is now at f9f8057 test
      • git config user.name bitbucket-pipelines
      • git config user.email commits-noreply@bitbucket.org
      • git config push.default current
      • git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/
      • git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME
      • echo ".bitbucket/pipelines/generated" >> .git/info/exclude
      • chmod 777 $BUILD_DIR
      • export ENVIRONMENT=develop K8S_APP_HOSTNAME=$K8S_APP_HOSTNAME_DEVELOP K8S_NAMESPACE=develop
      • export STACK_NAME="$K8S_APP_NAME-$ENVIRONMENT" K8S_DEPLOYMENT_STRATEGY=RollingUpdate K8S_ISTIO_GW_NAME=$K8S_ISTIO_GW_NAME IMAGE_REPO="gcr.io/$K8S_GCP_PROJECT_ID/$K8S_APP_NAME"
      • export IMAGE_TAG="$ENVIRONMENT-build.$BITBUCKET_BUILD_NUMBER" IMAGE_REPO="gcr.io/$K8S_GCP_PROJECT_ID_TEST/$K8S_APP_NAME" K8S_APP_NAME="$K8S_APP_NAME-$ENVIRONMENT" K8S_DEPLOYMENT_STRATEGY=Recreate K8S_GCP_DEPLOYER=$K8S_GCP_DEPLOYER_TEST K8S_GCP_DEPLOYER_KEY=$K8S_GCP_DEPLOYER_KEY_TEST K8S_GCP_CLUSTER_NAME=$K8S_GCP_CLUSTER_NAME_TEST K8S_GCP_CLUSTER_ZONE=$K8S_GCP_CLUSTER_ZONE_TEST K8S_GCP_PROJECT_ID=$K8S_GCP_PROJECT_ID_TEST K8S_ISTIO_GW_NAME=$K8S_ISTIO_GW_NAME_TEST K8S_ALI_CERT=$K8S_ALI_CERT_TEST K8S_ALI_USER_CERT=$K8S_ALI_USER_CERT_TEST K8S_ALI_USER_KEY=$K8S_ALI_USER_KEY_TEST K8S_ALI_ENDPOINT=$K8S_ALI_ENDPOINT_TEST K8S_ALI_ACCESS_KEY_ID=$K8S_ALI_ACCESS_KEY_ID_TEST K8S_ALI_SECRET_ACCESS_KEY=$K8S_ALI_SECRET_ACCESS_KEY_TEST K8S_ALI_DEFAULT_REGION=$K8S_ALI_DEFAULT_REGION_TEST K8S_ALI_REPO_NAMESPACE=$K8S_ALI_REPO_NAMESPACE_TEST K8S_PODS_REPLICA_COUNT=1 K8S_AZ_DEPLOYER_KEY=$K8S_AZ_DEPLOYER_KEY_TEST K8S_AZ_SP_URL=$K8S_AZ_SP_URL_TEST K8S_AZ_AD_TENANT=$K8S_AZ_AD_TENANT_TEST K8S_AZ_CR_NAME=$K8S_AZ_CR_NAME_TEST K8S_AZ_RESOURCE_GROUP=$K8S_AZ_RESOURCE_GROUP_TEST K8S_AZ_AKS_NAME=$K8S_AZ_AKS_NAME_TEST
      • export K8S_REPO_PULL_SECRET=$K8S_AZ_REPO_PULL_SECRET
        echo $K8S_AZ_DEPLOYER_KEY |base64 --decode > az_auth.pem
        az login --service-principal -u $K8S_AZ_SP_URL -p az_auth.pem --tenant $K8S_AZ_AD_TENANT
        az acr login --name $K8S_AZ_CR_NAME
        az aks get-credentials --resource-group $K8S_AZ_RESOURCE_GROUP --name $K8S_AZ_AKS_NAME
        kubectl config set-context $(kubectl config current-context) --namespace=$K8S_NAMESPACE
        export IMAGE_REPO_ENDPOINT=$K8S_AZ_CR_NAME.azurecr.io
        export IMAGE_REPO=$IMAGE_REPO_ENDPOINT/$K8S_APP_NAME
        Login Succeeded
        WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
        Configure a credential helper to remove this warning. See
        https://docs.docker.com/engine/reference/commandline/login/#credentials-store

      Merged "at-k8s-dev" as current context in /root/.kube/config
      Context "at-k8s-dev" modified.

      • npm install
        npm run build
        ls -al
        chmod 777 -R dist

      nodent-runtime@3.2.1 install /opt/atlassian/pipelines/agent/build/node_modules/nodent-runtime

      node build.js

      Built /opt/atlassian/pipelines/agent/build/node_modules/nodent-runtime/dist/index.js

      yorkie@2.0.0 install /opt/atlassian/pipelines/agent/build/node_modules/yorkie

      node bin/install.js

      CI detected, skipping Git hooks installation

      core-js@2.6.9 postinstall /opt/atlassian/pipelines/agent/build/node_modules/core-js

      node scripts/postinstall || echo "ignore"

      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted

      {"os":"darwin","arch":"any"}

      (current:

      {"os":"linux","arch":"x64"}

      )

      added 1408 packages from 1410 contributors and audited 29318 packages in 23.095s
      found 0 vulnerabilities

      at-client-portal-mobile@0.1.0 build /opt/atlassian/pipelines/agent/build

      vue-cli-service build

      • Building for production...
        DONE Compiled successfully in 8568ms06:54:33

      File Size Gzipped

      dist/js/chunk-vendors.6ac2e366.js 164.20 KiB 53.25 KiB
      dist/js/chunk-03c3c805.529f15eb.js 47.35 KiB 12.58 KiB
      dist/js/app.21dcf483.js 6.92 KiB 2.97 KiB
      dist/js/chunk-b117f5e0.5563c472.js 0.97 KiB 0.57 KiB
      dist/js/chunk-2d2179f0.27fe513d.js 0.47 KiB 0.34 KiB
      dist/css/chunk-vendors.781454bb.css 22.26 KiB 4.02 KiB
      dist/css/chunk-03c3c805.d3121a5b.css 4.60 KiB 1.14 KiB
      dist/css/app.9a088874.css 1.43 KiB 0.63 KiB
      dist/css/chunk-b117f5e0.67297173.css 0.83 KiB 0.36 KiB

      Images and other types of assets omitted.

      DONE Build complete. The dist directory is ready to be deployed.
      INFO Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html

      total 628
      drwxrwxrwx. 10 root root 4096 Sep 2 06:54 .
      drwxr-xr-x. 8 root root 4096 Sep 2 06:53 ..
      rw-rw-rw. 1 root root 5297 Sep 2 06:53 az_auth.pem
      rw-rw-rw. 1 root root 183 Sep 2 06:53 babel.config.js
      rw-rw-rw. 1 root root 16897 Sep 2 06:53 bitbucket-pipelines.yml
      rw-rw-rw. 1 root root 21 Sep 2 06:53 .browserslistrc
      rw-rw-rw. 1 root root 50 Sep 2 06:53 cypress.json
      drwxrwxrwx. 5 root root 4096 Sep 2 06:54 dist
      rw-rw-rw. 1 root root 163 Sep 2 06:53 Dockerfile
      rw-rw-rw. 1 root root 282 Sep 2 06:53 .dockerignore
      rw-rw-rw. 1 root root 121 Sep 2 06:53 .editorconfig
      rw-rw-rw. 1 root root 55 Sep 2 06:53 .env
      rw-rw-rw. 1 root root 481 Sep 2 06:53 .eslintrc.js
      rw-rw-rw. 1 root root 909 Sep 2 06:53 gcp-cloudbuild.yaml
      drwxrwxrwx. 8 root root 4096 Sep 2 06:53 .git
      rw-rw-rw. 1 root root 258 Sep 2 06:53 .gitignore
      drwxrwxrwx. 3 root root 4096 Sep 2 06:53 helm
      drwxrwxrwx. 903 root root 36864 Sep 2 06:54 node_modules
      rw-rw-rw. 1 root root 1434 Sep 2 06:53 package.json
      rw-rw-rw. 1 root root 481868 Sep 2 06:54 package-lock.json
      rw-rw-rw. 1 root root 59 Sep 2 06:53 postcss.config.js
      drwxrwxrwx. 2 root root 4096 Sep 2 06:53 public
      rw-rw-rw. 1 root root 1634 Sep 2 06:53 README.md
      drwxrwxrwx. 9 root root 4096 Sep 2 06:53 src
      drwxrwxrwx. 4 root root 4096 Sep 2 06:53 tests
      drwxrwxrwx. 2 root root 4096 Sep 2 06:53 tools
      rw-rw-rw. 1 root root 436 Sep 2 06:53 vue.config.js

      • docker --version
        docker build -t $IMAGE_REPO:$IMAGE_TAG .
        docker push $IMAGE_REPO:$IMAGE_TAG

      Docker version 18.09.3, build 774a1f4
      Sending build context to Docker daemon 126kB
      Step 1/5 : FROM nginx:1.14.2-alpine
      1.14.2-alpine: Pulling from library/nginx
      bdf0201b3a05: Pulling fs layer
      3d0a573c81ed: Pulling fs layer
      8129faeb2eb6: Pulling fs layer
      3dc99f571daf: Pulling fs layer
      3dc99f571daf: Waiting
      8129faeb2eb6: Verifying Checksum
      8129faeb2eb6: Download complete
      bdf0201b3a05: Verifying Checksum
      bdf0201b3a05: Download complete
      bdf0201b3a05: Pull complete
      3d0a573c81ed: Verifying Checksum
      3d0a573c81ed: Download complete
      3dc99f571daf: Verifying Checksum
      3dc99f571daf: Download complete
      3d0a573c81ed: Pull complete
      8129faeb2eb6: Pull complete
      3dc99f571daf: Pull complete
      Digest: sha256:485b610fefec7ff6c463ced9623314a04ed67e3945b9c08d7e53a47f6d108dc7
      Status: Downloaded newer image for nginx:1.14.2-alpine
      ---> 8a2fb25a19f5
      Step 2/5 : RUN rm -rf /usr/share/nginx/html/*
      ---> Running in 8706fa95ca3e
      Removing intermediate container 8706fa95ca3e
      ---> 0f7e8f896706
      Step 3/5 : COPY dist/ /usr/share/nginx/html/
      COPY failed: stat */var/lib/docker/165536.165536/tmp/docker-builder198574421/*dist: no such file or directory
      Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4
      Finished scanning for test reports. Found 0 test report files.
      Merged test suites, total number tests is 0, with 0 failures and 0 errors.

          Form Name

            [BCLOUD-19405] docker build copy failed . should be copy form /opt/atlassian/pipelines/agent/build/dist to dst dir,but copy from /var/lib/docker/165536.165536/tmp/docker-builder198574421/dist

            Batbayar B added a comment -

            I've had exact same problems and your comment helped me to resolve it.

            Batbayar B added a comment - I've had exact same problems and your comment helped me to resolve it.

            resolved.
            the reson is the .dockerignore file include dist

            remove dist from .dockerignore then resolved.

            Deleted Account (Inactive) added a comment - resolved. the reson is the .dockerignore file include dist remove dist from .dockerignore then resolved.

              Unassigned Unassigned
              29ff2a7a-4457-4da8-ba46-27f39568e7de Deleted Account (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: