add woodpecker ci script
This commit is contained in:
parent
0d9be34bc7
commit
6ba4dd2cc2
@ -1,26 +0,0 @@
|
||||
image: registry.hottis.de/dockerized/docker-bash:latest
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
variables:
|
||||
IMAGE_NAME: registry.hottis.de/dockerized/build-env-msp430
|
||||
HUB_IMAGE_NAME: wollud1969/build-env-msp430
|
||||
|
||||
build:
|
||||
stage: build
|
||||
tags:
|
||||
- hottis
|
||||
- linux
|
||||
- docker
|
||||
script:
|
||||
- VERSION=`cat VERSION`
|
||||
- echo "Version is $VERSION"
|
||||
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:latest .
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker push $IMAGE_NAME:latest
|
||||
- docker push $IMAGE_NAME:$VERSION
|
||||
- docker login -u $DOCKER_HUB_LOGIN -p $DOCKER_HUB_PASSWORD
|
||||
- docker push $HUB_IMAGE_NAME:latest
|
||||
- docker push $HUB_IMAGE_NAME:$VERSION
|
||||
|
23
.woodpecker.yml
Normal file
23
.woodpecker.yml
Normal file
@ -0,0 +1,23 @@
|
||||
steps:
|
||||
build:
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
repo: ${FORGE_NAME}/${CI_REPO}
|
||||
registry:
|
||||
from_secret: container_registry
|
||||
tags: latest,${CI_COMMIT_SHA},${CI_COMMIT_TAG}
|
||||
username:
|
||||
from_secret: container_registry_username
|
||||
password:
|
||||
from_secret: container_registry_password
|
||||
dockerfile: Dockerfile
|
||||
when:
|
||||
- event: [push, tag]
|
||||
|
||||
scan_image:
|
||||
image: aquasec/trivy
|
||||
commands:
|
||||
- trivy image $FORGE_NAME/$CI_REPO:$CI_COMMIT_SHA --quiet --exit-code 1
|
||||
when:
|
||||
- event: [push, tag]
|
||||
|
29
Dockerfile
29
Dockerfile
@ -1,37 +1,14 @@
|
||||
FROM ubuntu:focal
|
||||
FROM ubuntu:24.04
|
||||
|
||||
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
||||
LABEL ImageName="registry.hottis.de/dockerized/build-env-msp430"
|
||||
LABEL AlternativeImageName="wollud1969/build-env-msp430"
|
||||
LABEL ImageName="gitea.hottis.de/wn/build-env-msp430"
|
||||
|
||||
ARG RELEASETOOL_URL="https://home.hottis.de/gitlab/wolutator/gitlabreleaseuploader/uploads/25ef4a3247a99a0dbaf6507dd9cba36e/GitlabReleaseTool.zip"
|
||||
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y make && \
|
||||
apt install -y openssh-client && \
|
||||
apt install -y git && \
|
||||
apt install -y python-is-python3 && \
|
||||
apt install -y python3-requests && \
|
||||
apt install -y python3-pycodestyle && \
|
||||
apt install -y python3-yaml && \
|
||||
apt install -y gpg && \
|
||||
apt install -y apt-transport-https && \
|
||||
apt install -y wget && \
|
||||
apt install -y curl && \
|
||||
apt install -y unzip && \
|
||||
apt install -y zip && \
|
||||
env DEBIAN_FRONTEND=noninteractive apt install -y vim-nox && \
|
||||
apt install -y msp430-libc && \
|
||||
apt install -y binutils-msp430 && \
|
||||
apt install -y gcc-msp430 && \
|
||||
cd /tmp && \
|
||||
wget $RELEASETOOL_URL && \
|
||||
unzip GitlabReleaseTool.zip && \
|
||||
chmod 755 gitlabreleaseuploader.py && \
|
||||
chmod 755 deleterelease.py && \
|
||||
mv gitlabreleaseuploader.py /usr/bin && \
|
||||
mv deleterelease.py /usr/bin
|
||||
|
||||
apt install -y gcc-msp430
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user