mirror of
https://git.netzspielplatz.de/docker-multiarch/openwrt-firmware-selector.git
synced 2025-11-08 15:49:27 +00:00
a new ci approach
This commit is contained in:
commit
6cca13d499
1 changed files with 51 additions and 0 deletions
51
.gitlab-ci.yml
Normal file
51
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
image: egon0/docker-with-buildx-and-git
|
||||
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ''
|
||||
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
stages:
|
||||
- collect_stage
|
||||
- build_stage
|
||||
- deploy
|
||||
|
||||
build_collect:
|
||||
stage: collect_stage
|
||||
image: python:bullseye
|
||||
script:
|
||||
- git clone https://github.com/sudhanshu16/openwrt-firmware-selector.git
|
||||
- cd openwrt-firmware-selector
|
||||
- cat ./src/config.ts
|
||||
- python ./scripts/collect.py --image-url 'https://downloads.openwrt.org/{base}/{target}' https://downloads.openwrt.org ./src ./public/
|
||||
- echo "asdf" > ./src/asdf.txt
|
||||
- cat ./src/config.ts
|
||||
artifacts:
|
||||
name: 'collect_${CI_COMMIT_REF_NAME}'
|
||||
paths:
|
||||
- ./public/
|
||||
- ./src/
|
||||
|
||||
build_stage:
|
||||
stage: build_stage
|
||||
image: node:lts-alpine
|
||||
script:
|
||||
- ls -lha
|
||||
- cat ./src/config.ts
|
||||
dependencies:
|
||||
- build_collect
|
||||
|
||||
deploy_docker:
|
||||
stage: deploy
|
||||
variables:
|
||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
D_IMAGE_TAG: egon0/openwrt-firmware-selector-multiarch:$CI_COMMIT_REF_SLUG
|
||||
D_LATEST_TAG: egon0/openwrt-firmware-selector-multiarch:latest
|
||||
script:
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||
#- docker buildx create --use --name A$CI_COMMIT_SHORT_SHA
|
||||
#- docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest -t $D_IMAGE_TAG -t $D_LATEST_TAG .
|
||||
Loading…
Add table
Add a link
Reference in a new issue