Giter VIP home page Giter VIP logo

Comments (5)

pzeballos avatar pzeballos commented on August 26, 2024 1

Hey @oh-tarnished! can you send that question to Support? as is not an issue related specifically with the plugin. Thanks!

from docker-compose-buildkite-plugin.

toote avatar toote commented on August 26, 2024

@oh-tarnished as the error states, none of the common anchors have a run or build configuration for the plugin. Based on the step's configuraton, I assume that you are trying to run the command specified in the container, so you would need to add a run element to the plugin's configuration with the name of the service you want to run the script on.

How can I set the workdir for the Docker Compose plugin while keeping the common attribute functional? since i need to change the directory to run the commands.

That depends on how or why the workdir would need to change. If it is depending on the architecture, you could have different workdir configurations for each common element. If not, let us know exactly your scenario and we can further troubleshoot.

from docker-compose-buildkite-plugin.

oh-tarnished avatar oh-tarnished commented on August 26, 2024

Hey @toote, Thank you for the docker-compose command issue (fixed it). So our CI is with @bazelbuild, and there are multiple workspaces where the CI needs to run on hence the workdir needs to be changed else bazel throws an error. The commands needs to be executed in the dir of the project. and we have multiple of them.

from docker-compose-buildkite-plugin.

toote avatar toote commented on August 26, 2024

@oh-tarnished interesting usecase. I am not too familiar with Bazel builds but you could always change the directory in your script being run instead of relying on the pipeline to specify the folder correctly. If your script does not have enough information for that, you could use an environment variable set at the pipeline, step or plugin level to pass through to the script instead. Alternatively, you can always remove the workdir option from the plugin to have the command be run in the container's default directory (assuming that it is set correctly in the corresponding Dockerfile when the image is built).

What do you think?

from docker-compose-buildkite-plugin.

oh-tarnished avatar oh-tarnished commented on August 26, 2024

@toote Well yeah that works, thank you. It was my bad i was trying to do it wrong. fixed it.

Right now i'm facing another issue with docker-compose using cached images.

Context

Following up on the previously reported issue, we are still experiencing problems with Docker image tagging and pushing in our Buildkite pipeline. The error persists when trying to tag and push images to Docker Hub, particularly with our multi-architecture setup (x86 and arm64).

Error Message

[2023-12-21T06:46:07Z] $ docker tag buildkite018c8b1e0f8c4010810dd67ea35fab8d_tryoutlab_workspace tryoutlab_workspace:dockerhub/tryoutlab:tryoutlab-workspace-latest
[2023-12-21T06:46:07Z] Error response from daemon: No such image: buildkite018c8b1e0f8c4010810dd67ea35fab8d_tryoutlab_workspace:latest
[2023-12-21T06:46:07Z] 🚨 Error: The command exited with status 1

Updated pipeline.yaml

# Buildkite Pipeline Configuration for tryoutlab
env:
  PROJECT_ENVIRONMENT: buildkite
  DRY_RUN: false

common:
 - docker_workspace: &run_docker_workspace
    docker-compose#v4.16.0:
      run: tryoutlab_workspace
      config: .buildkite/docker-compose.yaml
      workdir: /workspace
      image-name: tryoutlab-build-${BUILDKITE_BRANCH}
      image-repository: dockerhub/tryoutlab
      cache-from:
        - tryoutlab_workspace:dockerhub/tryoutlab:tryoutlab-workspace-latest
        - tryoutlab_workspace:dockerhub/tryoutlab:tryoutlab-workspace-${BUILDKITE_BRANCH}

steps:
  - label: ":sweating: Random Check ✨"
    command: .buildkite/steps/blah.sh
    plugins: *docker_workspace

  - label: ":broom: Cleanup: Push :buildkite: Cache Images to :docker: Hub"
    plugins:
      - docker-compose#v4.16.0:
          config: .buildkite/docker-compose.yaml
          push:
          - tryoutlab_workspace:dockerhub/tryoutlab:tryoutlab-workspace-latest
          - tryoutlab_workspace:dockerhub/tryoutlab:tryoutlab-workspace-${BUILDKITE_BRANCH}

Further Assistance Needed

  • Issue with Renaming: It appears that the Docker image has been renamed, and the system is attempting to push the image before this renaming takes place, resulting in the latest version not being pushed.
  • Suggestions for Managing the Default :latesttag Is there a way to ignore the default :latest tag? According to the documentation, it is set by default.

Looking forward to any further advice or solutions to this persisting issue.

from docker-compose-buildkite-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.