Skip to content

Conversation

@quaresmajose
Copy link
Member

@quaresmajose quaresmajose commented May 8, 2025

If the environment variable is present, use it as a tag when creating the container.
The default is build with the tag latest and also with the corresponding version tag.

@quaresmajose
Copy link
Member Author

The main intention of this PR is to add the possibility to build hub.foundries.io/lmp-sdk:next on the lmp-manifest/main branch.


container="hub.foundries.io/lmp-sdk"
tagged="${container}:${TAG}"
latest="${container}:latest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll wind up needing a block like:
https://github.com/foundriesio/ci-scripts/blob/master/lmp/jobserv.yml#L18-L24

for changes to the "next" branch. Seems like the easiest way to control that will be via an environment variable. e.g.

- name: lmp-sdk-next
        host-tag: amd64
        container: foundries/dind-ci:19.03.9_b38f166
        privileged: true
        params:
           LATEST=next
        script-repo:
          name: fio
          path: lmp/build-sdk-container.sh

And then you could have this script take a variable for "latest". e.g:

LATEST=${LATEST:latest}
``

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well! With the argument it wouldn't work. thanks for the tip.
Also added the block on the main build job:

- name: lmp-sdk-next
        host-tag: amd64
        container: foundries/dind-ci:19.03.9_b38f166
        privileged: true
        params:
           LATEST=next
        script-repo:
          name: fio
          path: lmp/build-sdk-container.sh

…ariable

If the environment variable is present, use it as a tag when creating the container.
The default is build with the tag latest and also with the corresponding version tag.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
@quaresmajose quaresmajose force-pushed the build-sdk-container branch from 3efadd7 to 406defe Compare May 9, 2025 10:49
@quaresmajose quaresmajose changed the title lmp/build-sdk-container: add tag argument lmp/build-sdk-container: override the latest tag via an environment variable May 9, 2025
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
@quaresmajose quaresmajose force-pushed the build-sdk-container branch from 406defe to f74fe0d Compare May 9, 2025 13:47
Copy link
Member

@doanac doanac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. we've wanted something like this for a long time

@ricardosalveti ricardosalveti merged commit 3e0c397 into foundriesio:master May 9, 2025
2 checks passed
@quaresmajose quaresmajose deleted the build-sdk-container branch May 12, 2025 09:12
@angolini
Copy link
Contributor

is this something we need to document (in the docs)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants