Fix buildinfo.json generation

This commit is contained in:
jspijker 2022-11-13 10:47:03 +01:00
parent 9d690da9d5
commit 2e0619d647
3 changed files with 19 additions and 44 deletions

View file

@ -7,22 +7,14 @@ on:
required: true
type: string
build_id:
required: true
type: number
recipe_user:
required: true
type: string
recipe_channel:
required: true
type: string
recipe_id_full:
required: true
type: string
build_id:
required: true
type: number
recipe_id_latest:
required: false
type: string
@ -53,11 +45,6 @@ on:
default: true
type: boolean
create_from_source:
required: false
default: false
type: boolean
env:
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
@ -148,33 +135,23 @@ jobs:
if: ${{ inputs.conan_config_branch == '' }}
run: conan config install https://github.com/Ultimaker/conan-config.git
- name: Create the Packages and the buildinfo.json
if: ${{ !inputs.create_from_source }}
- name: Create the lock file
run: |
conan_build_info --v2 start ${{ inputs.project_name }} ${{ github.run_number }}000${{ inputs.build_id }}
conan lock create --reference ${{ inputs.recipe_id_full }} --user=${{ inputs.recipe_user }} --channel=${{ inputs.recipe_channel }} --lockfile-out=conan.lock
conan install ${{ inputs.recipe_id_full }} --build=missing --update --lockfile=conan.lock --lockfile-out=conan.lock
conan_build_info --v2 create buildinfo.json --lockfile conan.lock --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
conan_build_info --v2 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
conan_build_info --v2 stop
conan lock create --reference ${{ inputs.recipe_id_full }} --lockfile-out=conan.lock
- name: Create the Packages (from source)
if: ${{ inputs.create_from_source }}
run: conan create . ${{ inputs.recipe_id_full }} --build=missing --update
- name: Create the Packages and the build info
run: conan install ${{ inputs.recipe_id_full }} --build=missing --update --lockfile=conan.lock --lockfile-out=conan.lock
- name: Remove the latest alias
if: ${{ inputs.create_from_source && inputs.recipe_id_latest != '' && runner.os == 'Linux' }}
run: |
conan remove ${{ inputs.recipe_id_latest }} -r cura -f || true
conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f || true
- name: Create the build info
run: conan_build_info --v2 create buildinfo.json --lockfile conan.lock --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
- name: Create the latest alias
if: ${{ inputs.create_from_source && inputs.recipe_id_latest != '' && always() }}
run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}
- name: Upload the Package(s)
- name: Upload the Package(s) and build info
if: always()
run: conan upload "*" -r cura --all -c
run: |
conan upload "*" -r cura --all -c
conan_build_info --v2 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}conan_build_info --v2 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
conan_build_info --v2 stop
- name: Upload the Package(s) community
if: ${{ always() && inputs.conan_upload_community == true }}

View file

@ -82,10 +82,8 @@ jobs:
uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
with:
project_name: ${{ needs.conan-recipe-version.outputs.recipe_projectname }}
build_id: 1
recipe_user: ${{ needs.conan-recipe-version.outputs.recipe_user }}
recipe_channel: ${{ needs.conan-recipe-version.outputs.recipe_channel }}
recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
build_id: 1
runs_on: 'ubuntu-20.04'
python_version: '3.10.x'
conan_logging_level: 'info'

View file

@ -29,15 +29,15 @@ on:
description: "is current branch a release branch?"
value: ${{ jobs.get-semver.outputs.release_branch }}
recipe_user:
user:
description: "The conan user"
value: ${{ jobs.get-semver.outputs.user }}
recipe_channel:
channel:
description: "The conan channel"
value: ${{ jobs.get-semver.outputs.channel }}
recipe_projectname:
project_name:
description: "The conan projectname"
value: ${{ inputs.project_name }}