Skip to content
Commits on Source (7)
# file: https://git.shivering-isles.com/container-library/build-ah-engine/-/raw/feature/multiarch/gitlab-ci-template-manifest.yml
# project: container-library/build-ah-engine
# ref: feature/multiarch
# commit: 5a08df6469401d7675d5401e62e9c5b647e34d8f
# date: 2021-06-23
stages:
- build
- tag
variables:
CI_REGISTRY_BUILD_ARGS: ""
.container-build:
stage: build
inherit:
default: false
variables: true
image: quay.io/sheogorath/build-ah-engine:2.0.0
artifacts:
paths:
- logs/
expire_in: 1 week
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- export VCS_REF="$CI_COMMIT_SHA"
- export VCS_URL="$CI_PROJECT_URL"
- export BUILD_DATE="$(date --rfc-3339 ns)"
script:
- si-fix "${CI_REGISTRY_BUILD_DOCKERFILE:-./Dockerfile}"
- podman build --pull
--label "org.opencontainers.image.source=$CI_PROJECT_URL"
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
--label "org.opencontainers.image.created=$(date --rfc-3339 ns)"
--label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
$CI_REGISTRY_BUILD_ARGS
-t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-$(uname -i)"
--format docker
.
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-$(uname -i)"
- mkdir logs/
- echo "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-$(uname -i)" > "logs/build-$(uname -i).log"
container-manifest:
stage: tag
inherit:
default: false
variables: true
image: quay.io/sheogorath/build-ah-engine:2.0.0
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- export BUILD_DATE="$(date --rfc-3339 ns)"
script:
- IMAGE_REFERENCES=()
- for log in logs/*.log; do IMAGE_REFERENCES+=("$(cat "$log")"); done
- si-manifest --push -l "$CI_REGISTRY_IMAGE" "${CI_REGISTRY_IMAGE_VERSION}" "${IMAGE_REFERENCES[@]}"
resource_group: latest
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
......@@ -34,7 +34,7 @@ variables:
- CI_SSHFS_PRIVATE_KEY
- CI_REGISTRY_IMAGE
- CI_REGISTRY_IMAGE_VERSION_IN_TEST
image: quay.io/os-forge/rpm-ostree-engine:0.5.1
image: quay.io/os-forge/rpm-ostree-engine:0.5.2
before_script:
- if [ -z "$CI_SSHFS_TARGET" ]; then rpm-ostree-engine-ci-prepare sshfs --sshfs-target="$CI_SSHFS_TARGET" --sshfs-auth="$CI_SSHFS_AUTH" --sshfs-path="$CI_SSHFS_PATH" --sshfs-key="$CI_SSHFS_PRIVATE_KEY"; fi
script:
......@@ -61,7 +61,7 @@ variables:
- CI_OSTREE_REMOTE
- CI_REGISTRY_IMAGE
- CI_REGISTRY_IMAGE_VERSION_IN_TEST
image: quay.io/os-forge/rpm-ostree-engine:0.5.1
image: quay.io/os-forge/rpm-ostree-engine:0.5.2
script:
- export OSTREE_REF="$(rpm-ostree-engine-ci-ref --name="$CI_OSTREE_REF_NAME")"
- export IMAGE_NAME="${OSTREE_REF//\//-}-$(date +%Y%m%d)-iot.raw"
......@@ -87,7 +87,7 @@ variables:
variables:
SSH_TIMEOUT_SEC: 300
SSH_RETRIES_NUM: 10
image: quay.io/os-forge/rpm-ostree-engine:0.5.1
image: quay.io/os-forge/rpm-ostree-engine:0.5.2
script:
- export OSTREE_REF="$(rpm-ostree-engine-ci-ref --name="$CI_OSTREE_REF_NAME" --arch="$CI_OSTREE_REF_ARCH")"
- export IMAGE_NAME="${OSTREE_REF//\//-}-$(date +%Y%m%d)-iot.raw"
......@@ -123,7 +123,7 @@ variables:
- CI_SSHFS_PRIVATE_KEY
- CI_REGISTRY_IMAGE
- CI_REGISTRY_IMAGE_VERSION_IN_TEST
image: quay.io/os-forge/rpm-ostree-engine:0.5.1
image: quay.io/os-forge/rpm-ostree-engine:0.5.2
before_script:
- rpm-ostree-engine-ci-prepare sshfs --sshfs-target="$CI_SSHFS_TARGET" --sshfs-auth="$CI_SSHFS_AUTH" --sshfs-path="$CI_SSHFS_PATH" --sshfs-key="$CI_SSHFS_PRIVATE_KEY"
script:
......@@ -164,7 +164,7 @@ variables:
- CI_GPG_KEY_ID
- CI_REGISTRY_IMAGE
- CI_REGISTRY_IMAGE_VERSION_IN_TEST
image: quay.io/os-forge/rpm-ostree-engine:0.5.1
image: quay.io/os-forge/rpm-ostree-engine:0.5.2
before_script:
- rpm-ostree-engine-ci-prepare sshfs --sshfs-target="$CI_SSHFS_TARGET" --sshfs-auth="$CI_SSHFS_AUTH" --sshfs-path="$CI_SSHFS_PATH" --sshfs-key="$CI_SSHFS_PRIVATE_KEY"
script:
......
include:
- project: 'container-library/build-ah-engine'
ref: feature/multiarch
file: '/gitlab-ci-template-manifest.yml'
- local: '.gitlab-ci-template-build-ah-engine-manifest.yml'
stages:
- lint
......@@ -11,12 +9,13 @@ stages:
- release
variables:
CI_REGISTRY_IMAGE_VERSION: "0.5.1"
CI_REGISTRY_IMAGE_VERSION: "0.5.2"
CI_REGISTRY_IMAGE_VERSION_IN_TEST: "$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
CI_OSTREE_REF_NAME: OSTreeBeard
CI_OSTREE_FILES: ./ostree-files
CI_OSTREE_SPEC: ostree.json
CI_OSTREE_TREECOMPOSE: treecompose-post.sh
CI_ADD_TEST: 1
shellcheck:
image: docker.io/library/fedora:33
......@@ -51,8 +50,7 @@ test-aarch64:
needs:
- container-build-aarch64
rules:
- if: '$CI_ADD_TEST == "0" || $CI_COMMIT_TAG'
when: never
- if: '$CI_ADD_TEST == "1" && $CI_COMMIT_TAG == null'
test-x86_64:
stage: test
......@@ -63,8 +61,7 @@ test-x86_64:
needs:
- container-build-x86_64
rules:
- if: '$CI_ADD_TEST == "0" || $CI_COMMIT_TAG'
when: never
- if: '$CI_ADD_TEST == "1" && $CI_COMMIT_TAG == null'
container-manifest:
stage: tag
......@@ -85,6 +82,6 @@ gitlab-release:
release-cli create --name "$RELEASE_NAME" --description "$RELEASE_DESCRIPTION"
--tag-name "v${RELEASE_VERSION}" --ref $CI_COMMIT_SHA
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG
- if: $CI_COMMIT_TAG
needs:
- container-manifest
......@@ -76,7 +76,7 @@ An example `.gitlab-ci.yml`:
```yaml
include:
- project: 'os-forge/rpm-ostree-engine'
ref: 'v0.5.1'
ref: 'v0.5.2'
file: 'gitlab-ci-template.yml'
variables:
......
......@@ -146,7 +146,6 @@ cp -r "${deploy}/etc/skel" "${osroot}/var/roothome"
mkdir -p "${osroot}/var/lib/"
mkdir -p "${osroot}/var/log/"
mkdir -p "${osroot}/var/home/"
mkdir -p "${osroot}/var/lib/rpm/"
mkdir -p "${osroot}/var/opt/"
mkdir -p "${osroot}/var/srv/"
mkdir -p "${osroot}/var/usrlocal/"
......
include:
# - remote: https://git.shivering-isles.com/os-forge/rpm-ostree-engine/-/raw/v0.5.1/.gitlab-ci-template.yml
# - remote: https://git.shivering-isles.com/os-forge/rpm-ostree-engine/-/raw/v0.5.2/.gitlab-ci-template.yml
- project: 'os-forge/rpm-ostree-engine'
ref: v0.5.1
ref: v0.5.2
file: '/.gitlab-ci-template.yml'
variables:
......
include:
# - remote: https://git.shivering-isles.com/os-forge/rpm-ostree-engine/-/raw/v0.5.1/.gitlab-ci-template-subpipeline.yml
# - remote: https://git.shivering-isles.com/os-forge/rpm-ostree-engine/-/raw/v0.5.2/.gitlab-ci-template-subpipeline.yml
- project: 'os-forge/rpm-ostree-engine'
ref: v0.5.1
ref: v0.5.2
file: '/.gitlab-ci-template-subpipeline.yml'
variables:
......
include:
# - remote: https://git.shivering-isles.com/os-forge/rpm-ostree-engine/-/raw/v0.5.1/.gitlab-ci-template-subpipeline.yml
# - remote: https://git.shivering-isles.com/os-forge/rpm-ostree-engine/-/raw/v0.5.2/.gitlab-ci-template-subpipeline.yml
- project: 'os-forge/rpm-ostree-engine'
ref: v0.5.1
ref: v0.5.2
file: '/.gitlab-ci-template-subpipeline.yml'
variables:
......