Skip to content
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

Dockerfiles with TARGETARCH and TARGETOS do not respect platforms values #40

Open
danlsgiga opened this issue Nov 21, 2024 · 0 comments
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working

Comments

@danlsgiga
Copy link

Describe the issue

When trying to build a docker image that has the following blocks, the build args are not being auto generated.

ARG TARGETOS
ARG TARGETARCH

Once I hardcode those via buildArgs, the build works.

buildArgs:
   TARGETARCH: amd64
   TARGETOS: linux

This is the flow code I'm using:

id: docker_build
namespace: github-runner
description: Build github runner Docker image
disabled: false

labels:
  component: github-runner

inputs:
  - id: release
    type: STRING
    defaults: v2.321.0

triggers:
  - id: listen_release_trigger
    type: io.kestra.plugin.core.trigger.Flow
    inputs:
      release: "{{ outputs.release.values.latest ?? inputs.release }}"
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionFlowCondition
        namespace: github-runner
        flowId: release_trigger
      - type: io.kestra.plugin.core.condition.ExecutionStatusCondition
        in:
          - SUCCESS
    
tasks:
  - id: build
    type: io.kestra.plugin.core.flow.WorkingDirectory
    tasks:
      - id: git_pull
        type: io.kestra.plugin.git.Clone
        branch: main
        url: https://github.com/actions/runner.git
      - id: image
        retry: 
          type: constant
          maxAttempt: 5
          interval: PT5M
        type: io.kestra.plugin.docker.Build
        dockerfile: images/Dockerfile
        buildArgs:
          RUNNER_VERSION: "{{ inputs.release | substringAfter('v') }}"
          TARGETARCH: amd64
          TARGETOS: linux
        tags:
          - danlsgiga/github-runner:latest
          - "danlsgiga/github-runner:{{ inputs.release | substringAfter('v') }}"
        platforms:
          - linux/amd64

Environment

  • Kestra Version: v0.19.11
@danlsgiga danlsgiga added area/plugin Plugin-related issue or feature request bug Something isn't working labels Nov 21, 2024
@kestrabot kestrabot bot added this to Issues Nov 21, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant