testing a focal update, drone, et c
	
		
			
	
		
	
	
		
	
		
			Some checks reported errors
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build was killed
				
			
		
		
	
	
				
					
				
			
		
			Some checks reported errors
		
		
	
	continuous-integration/drone/push Build was killed
				
			This commit is contained in:
		
							parent
							
								
									a1485030e8
								
							
						
					
					
						commit
						41114ce60a
					
				
							
								
								
									
										20
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					kind: pipeline
 | 
				
			||||||
 | 
					name: default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					steps:
 | 
				
			||||||
 | 
					- name: docker
 | 
				
			||||||
 | 
					  image: plugins/docker
 | 
				
			||||||
 | 
					  network_mode: bridge
 | 
				
			||||||
 | 
					  settings:
 | 
				
			||||||
 | 
					    build_args:
 | 
				
			||||||
 | 
					        - UBUNTU_MIRROR_URL=http://ubuntumirror.app.las1.eeqj.de/ubuntu
 | 
				
			||||||
 | 
					    repo: sneak/sandbox
 | 
				
			||||||
 | 
					    username:
 | 
				
			||||||
 | 
					      from_secret: docker_username
 | 
				
			||||||
 | 
					    password:
 | 
				
			||||||
 | 
					      from_secret: docker_password
 | 
				
			||||||
 | 
					    tags:
 | 
				
			||||||
 | 
					      - ${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8}
 | 
				
			||||||
 | 
					      - ${DRONE_COMMIT_SHA}
 | 
				
			||||||
 | 
					      - ${DRONE_BRANCH/\//-}
 | 
				
			||||||
 | 
					      - latest
 | 
				
			||||||
							
								
								
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							@ -1,15 +1,15 @@
 | 
				
			|||||||
FROM phusion/baseimage:0.11
 | 
					FROM ubuntu:focal
 | 
				
			||||||
CMD ["/sbin/my_init"]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
ADD ./sources.list /etc/apt/sources.list
 | 
					ARG USERNAME_TO_ADD=user
 | 
				
			||||||
 | 
					ARG UID_TO_ADD=1000
 | 
				
			||||||
 | 
					ARG GID_TO_ADD=1000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ARG UBUNTU_MIRROR_URL=http://us.archive.ubuntu.com/ubuntu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# setup
 | 
					# setup
 | 
				
			||||||
ADD ./run.sh /tmp/run.sh
 | 
					ADD ./run.sh /tmp/run.sh
 | 
				
			||||||
RUN bash /tmp/run.sh && rm /tmp/run.sh
 | 
					RUN bash /tmp/run.sh && rm /tmp/run.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# enable ssh
 | 
					 | 
				
			||||||
RUN rm -f /etc/service/sshd/down
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#cleanup
 | 
					#cleanup
 | 
				
			||||||
RUN apt-get clean && \
 | 
					RUN apt-get clean && \
 | 
				
			||||||
    rm -rf \
 | 
					    rm -rf \
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										45
									
								
								run.sh
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								run.sh
									
									
									
									
									
								
							@ -1,12 +1,25 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
export DEBIAN_FRONTEND=noninteractive
 | 
					export DEBIAN_FRONTEND=noninteractive
 | 
				
			||||||
 | 
					
 | 
				
			||||||
USERNAME="sneak"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -x
 | 
					set -x
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
exec 1> >(tee -a /var/log/sandboxbuild.log) 2>&1
 | 
					exec 1> >(tee -a /var/log/sandboxbuild.log) 2>&1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					MURM="main universe restricted multiverse"
 | 
				
			||||||
 | 
					M="http://us.archive.ubuntu.com/ubuntu"
 | 
				
			||||||
 | 
					C="$(lsb_release -cs)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ ! -z "$UBUNTU_MIRROR_URL" ]]; then
 | 
				
			||||||
 | 
					    M="$UBUNTU_MIRROR_URL"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat > /etc/apt/sources.list.new <<EOF
 | 
				
			||||||
 | 
					deb $M $C $MURM
 | 
				
			||||||
 | 
					deb $M $C-updates $MURM
 | 
				
			||||||
 | 
					deb $M $C-backports $MURM
 | 
				
			||||||
 | 
					deb $M $C-security $MURM
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PKGS="
 | 
					PKGS="
 | 
				
			||||||
    apt-transport-https
 | 
					    apt-transport-https
 | 
				
			||||||
    apt-utils
 | 
					    apt-utils
 | 
				
			||||||
@ -47,6 +60,7 @@ PKGS="
 | 
				
			|||||||
    lcov
 | 
					    lcov
 | 
				
			||||||
    ldap-auth-client
 | 
					    ldap-auth-client
 | 
				
			||||||
    ldap-utils
 | 
					    ldap-utils
 | 
				
			||||||
 | 
					    lftp
 | 
				
			||||||
    libasound2
 | 
					    libasound2
 | 
				
			||||||
    libatk1.0-0
 | 
					    libatk1.0-0
 | 
				
			||||||
    libboost-all-dev
 | 
					    libboost-all-dev
 | 
				
			||||||
@ -80,15 +94,11 @@ PKGS="
 | 
				
			|||||||
    pbzip2
 | 
					    pbzip2
 | 
				
			||||||
    pinentry-curses
 | 
					    pinentry-curses
 | 
				
			||||||
    pkg-config
 | 
					    pkg-config
 | 
				
			||||||
    pkg-config
 | 
					 | 
				
			||||||
    psmisc
 | 
					    psmisc
 | 
				
			||||||
    pv
 | 
					    pv
 | 
				
			||||||
    pwgen
 | 
					    pwgen
 | 
				
			||||||
    python
 | 
					 | 
				
			||||||
    python3
 | 
					    python3
 | 
				
			||||||
    python-dev
 | 
					 | 
				
			||||||
    python3-dev
 | 
					    python3-dev
 | 
				
			||||||
    python-pip
 | 
					 | 
				
			||||||
    python3-pip
 | 
					    python3-pip
 | 
				
			||||||
    rbenv
 | 
					    rbenv
 | 
				
			||||||
    rsync
 | 
					    rsync
 | 
				
			||||||
@ -143,10 +153,22 @@ for FN in /etc/bashrc.d/*.sh; do
 | 
				
			|||||||
    source "$FN"
 | 
					    source "$FN"
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ -d "$HOME/.bashrc.d" ]]; then
 | 
				
			||||||
 | 
					    for FN in /etc/bashrc.d/*.sh; do
 | 
				
			||||||
 | 
					        source "$FN"
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! shopt -oq posix; then
 | 
					if ! shopt -oq posix; then
 | 
				
			||||||
    for FN in /etc/profile.d/*.sh; do
 | 
					    for FN in /etc/profile.d/*.sh; do
 | 
				
			||||||
        source "$FN"
 | 
					        source "$FN"
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if [[ -d "$HOME/.profile.d" ]]; then
 | 
				
			||||||
 | 
					        for FN in /etc/profile.d/*.sh; do
 | 
				
			||||||
 | 
					            source "$FN"
 | 
				
			||||||
 | 
					        done
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -204,7 +226,7 @@ done
 | 
				
			|||||||
## install ppss, paralell processing shell script
 | 
					## install ppss, paralell processing shell script
 | 
				
			||||||
################################################################################
 | 
					################################################################################
 | 
				
			||||||
cd /usr/local/bin
 | 
					cd /usr/local/bin
 | 
				
			||||||
wget https://raw.githubusercontent.com/sneak/ppss/master/ppss
 | 
					wget https://git.eeqj.de/sneak/ppss/raw/branch/master/ppss
 | 
				
			||||||
chmod +x ./ppss
 | 
					chmod +x ./ppss
 | 
				
			||||||
 | 
					
 | 
				
			||||||
################################################################################
 | 
					################################################################################
 | 
				
			||||||
@ -222,6 +244,7 @@ PIP_PKGS="
 | 
				
			|||||||
    pipenv
 | 
					    pipenv
 | 
				
			||||||
    pylint
 | 
					    pylint
 | 
				
			||||||
    virtualenv
 | 
					    virtualenv
 | 
				
			||||||
 | 
					    glances
 | 
				
			||||||
"
 | 
					"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for PKG in $PIP_PKGS; do
 | 
					for PKG in $PIP_PKGS; do
 | 
				
			||||||
@ -231,7 +254,7 @@ done
 | 
				
			|||||||
################################################################################
 | 
					################################################################################
 | 
				
			||||||
## add working user and add to sudo nopassword
 | 
					## add working user and add to sudo nopassword
 | 
				
			||||||
################################################################################
 | 
					################################################################################
 | 
				
			||||||
groupadd -g 1000 $USERNAME
 | 
					groupadd -g $GID_TO_ADD $USERNAME_TO_ADD
 | 
				
			||||||
useradd -u 1000 -g 1000 -s /bin/bash $USERNAME
 | 
					useradd -u $UID_TO_ADD -g $GID_TO_ADD -s /bin/bash $USERNAME_TO_ADD
 | 
				
			||||||
usermod -p '*' $USERNAME
 | 
					usermod -p '*' $USERNAME_TO_ADD
 | 
				
			||||||
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
 | 
					echo "$USERNAME_TO_ADD ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +0,0 @@
 | 
				
			|||||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic main universe multiverse restricted
 | 
					 | 
				
			||||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main universe multiverse restricted
 | 
					 | 
				
			||||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main universe multiverse restricted
 | 
					 | 
				
			||||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports main universe multiverse restricted
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user