.gitlab-ci.yml 857 Bytes
Newer Older
Steffen Vogel's avatar
Steffen Vogel committed
1
2
variables:
  # Installer files are located on Zerberus NFS share
Steffen Vogel's avatar
Steffen Vogel committed
3
  PETA_RUN_FILE: petalinux-v2019.1-final-installer.run
Steffen Vogel's avatar
Steffen Vogel committed
4
5
6
7
8
  PETA_VERSION: "2019.1"

stages:
- build

Steffen Vogel's avatar
Steffen Vogel committed
9
10
11
12
13
cache:
  paths:
  - installers
  key: ${PETA_VERSION}

Steffen Vogel's avatar
Steffen Vogel committed
14
15
build:
  stage: build
Steffen Vogel's avatar
Steffen Vogel committed
16
  before_script:
Steffen Vogel's avatar
Steffen Vogel committed
17
18
  - mkdir -p installers
  - rsync /global/installers/${PETA_RUN_FILE} installers
Steffen Vogel's avatar
Steffen Vogel committed
19
  - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
Steffen Vogel's avatar
Steffen Vogel committed
20
  script:
Steffen Vogel's avatar
Steffen Vogel committed
21
  - docker pull ${CI_REGISTRY_IMAGE}:${PETA_VERSION} || true
Steffen Vogel's avatar
Steffen Vogel committed
22
  - docker build --cache-from ${CI_REGISTRY_IMAGE}:${PETA_VERSION} --build-arg PETA_VERSION=${PETA_VERSION} --build-arg PETA_RUN_FILE=installers/${PETA_RUN_FILE} --tag ${CI_REGISTRY_IMAGE}:latest --tag ${CI_REGISTRY_IMAGE}:${PETA_VERSION} .
Steffen Vogel's avatar
Steffen Vogel committed
23
24
  - docker push ${CI_REGISTRY_IMAGE}:${PETA_VERSION}
  - docker push ${CI_REGISTRY_IMAGE}:latest
Steffen Vogel's avatar
Steffen Vogel committed
25
26
27
  tags:
  - shell
  - linux