-
Notifications
You must be signed in to change notification settings - Fork 13
/
pipeline.yml
45 lines (43 loc) · 1.49 KB
/
pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: "1.1"
on:
push:
branches:
- master
- release/*
tags:
- v*
stages:
- stage:
- git-checkout:
alias: erda-operator
params:
depth: 1
- stage:
- extract-repo-version:
params:
git_dir: ${{ dirs.erda-operator }}
- stage:
- custom-script:
alias: build-erda-operator
commands:
- cd ${{ dirs.erda-operator }}
- docker login ${{ configs.docker_registry }} -u ${{ configs.docker_registry_username }} -p ${{ configs.docker_registry_password }}
- GO_PROXY_ENV=https://goproxy.cn/ REGISTRY_HOST=${{ configs.docker_registry }} IMAGE_TAG=${{ outputs.extract-repo-version.image_tag }} make push
resources:
cpu: 2
mem: 2048
- stage:
- custom-script:
alias: retag-erda-operator-image
version: "1.0"
commands:
- cd ${erda-operator}
- docker pull ${{ outputs.build-erda-operator.image }}
- docker login ${{ configs.docker_registry }} -u ${{ configs.docker_registry_username }} -p ${{ configs.docker_registry_password }}
- export new_image=${{ configs.docker_registry }}/dice-operator:${{ outputs.extract-repo-version.version }}
- docker tag ${{ outputs.build-erda-operator.image }} $new_image
- docker push $new_image
- echo "action meta:image=$new_image"
resources:
cpu: 2
mem: 2048