change to pulling compiled bins from a tag for rebuilds and using an OS tag based on package versions
rodzic
df41139ed4
commit
41860190ed
34
Dockerfile
34
Dockerfile
|
@ -1,36 +1,4 @@
|
||||||
FROM lsiobase/ubuntu:bionic as builder
|
FROM lsiobase/cloud9:files as builder
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
|
||||||
ARG NPM_CONFIG_UNSAFE_PERM=true
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
echo "**** install build packages ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
make \
|
|
||||||
python && \
|
|
||||||
echo "**** Compile Cloud9 from source ****" && \
|
|
||||||
git clone --depth 1 \
|
|
||||||
https://github.com/c9/core.git c9sdk && \
|
|
||||||
cd c9sdk && \
|
|
||||||
mkdir -p /c9bins && \
|
|
||||||
HOME=/c9bins scripts/install-sdk.sh && \
|
|
||||||
echo "**** Restructure files for copy ****" && \
|
|
||||||
mkdir -p \
|
|
||||||
/buildout && \
|
|
||||||
rm -Rf \
|
|
||||||
/c9bins/.c9/tmp && \
|
|
||||||
mv \
|
|
||||||
/c9bins \
|
|
||||||
/buildout/c9bins && \
|
|
||||||
mv \
|
|
||||||
/c9sdk \
|
|
||||||
/buildout/
|
|
||||||
|
|
||||||
# runtime stage
|
|
||||||
FROM lsiobase/ubuntu:bionic
|
FROM lsiobase/ubuntu:bionic
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
|
|
|
@ -1,36 +1,4 @@
|
||||||
FROM lsiobase/ubuntu:arm64v8-bionic as builder
|
FROM lsiobase/cloud9:arm64v8-files as builder
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
|
||||||
ARG NPM_CONFIG_UNSAFE_PERM=true
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
echo "**** install build packages ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
make \
|
|
||||||
python && \
|
|
||||||
echo "**** Compile Cloud9 from source ****" && \
|
|
||||||
git clone --depth 1 \
|
|
||||||
https://github.com/c9/core.git c9sdk && \
|
|
||||||
cd c9sdk && \
|
|
||||||
mkdir -p /c9bins && \
|
|
||||||
HOME=/c9bins scripts/install-sdk.sh && \
|
|
||||||
echo "**** Restructure files for copy ****" && \
|
|
||||||
mkdir -p \
|
|
||||||
/buildout && \
|
|
||||||
rm -Rf \
|
|
||||||
/c9bins/.c9/tmp && \
|
|
||||||
mv \
|
|
||||||
/c9bins \
|
|
||||||
/buildout/c9bins && \
|
|
||||||
mv \
|
|
||||||
/c9sdk \
|
|
||||||
/buildout/
|
|
||||||
|
|
||||||
# runtime stage
|
|
||||||
FROM lsiobase/ubuntu:arm64v8-bionic
|
FROM lsiobase/ubuntu:arm64v8-bionic
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
|
|
|
@ -1,36 +1,4 @@
|
||||||
FROM lsiobase/ubuntu:arm32v7-bionic as builder
|
FROM lsiobase/cloud9:arm32v7-files as builder
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
|
||||||
ARG NPM_CONFIG_UNSAFE_PERM=true
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
echo "**** install build packages ****" && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y \
|
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
make \
|
|
||||||
python && \
|
|
||||||
echo "**** Compile Cloud9 from source ****" && \
|
|
||||||
git clone --depth 1 \
|
|
||||||
https://github.com/c9/core.git c9sdk && \
|
|
||||||
cd c9sdk && \
|
|
||||||
mkdir -p /c9bins && \
|
|
||||||
HOME=/c9bins scripts/install-sdk.sh && \
|
|
||||||
echo "**** Restructure files for copy ****" && \
|
|
||||||
mkdir -p \
|
|
||||||
/buildout && \
|
|
||||||
rm -Rf \
|
|
||||||
/c9bins/.c9/tmp && \
|
|
||||||
mv \
|
|
||||||
/c9bins \
|
|
||||||
/buildout/c9bins && \
|
|
||||||
mv \
|
|
||||||
/c9sdk \
|
|
||||||
/buildout/
|
|
||||||
|
|
||||||
# runtime stage
|
|
||||||
FROM lsiobase/ubuntu:arm32v7-bionic
|
FROM lsiobase/ubuntu:arm32v7-bionic
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
|
|
|
@ -10,9 +10,6 @@ pipeline {
|
||||||
environment {
|
environment {
|
||||||
BUILDS_DISCORD=credentials('build_webhook_url')
|
BUILDS_DISCORD=credentials('build_webhook_url')
|
||||||
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
||||||
EXT_GIT_BRANCH = 'master'
|
|
||||||
EXT_USER = 'c9'
|
|
||||||
EXT_REPO = 'core'
|
|
||||||
BUILD_VERSION_ARG = 'CLOUD9_VERSION'
|
BUILD_VERSION_ARG = 'CLOUD9_VERSION'
|
||||||
LS_USER = 'linuxserver'
|
LS_USER = 'linuxserver'
|
||||||
LS_REPO = 'docker-baseimage-cloud9'
|
LS_REPO = 'docker-baseimage-cloud9'
|
||||||
|
@ -102,23 +99,14 @@ pipeline {
|
||||||
/* ########################
|
/* ########################
|
||||||
External Release Tagging
|
External Release Tagging
|
||||||
######################## */
|
######################## */
|
||||||
// If this is a github commit trigger determine the current commit at head
|
// If this is an os release set release type to none to indicate no external release
|
||||||
stage("Set ENV github_commit"){
|
stage("Set ENV os"){
|
||||||
steps{
|
steps{
|
||||||
script{
|
script{
|
||||||
env.EXT_RELEASE = sh(
|
env.EXT_RELEASE = env.PACKAGE_TAG
|
||||||
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''',
|
env.RELEASE_LINK = 'none'
|
||||||
returnStdout: true).trim()
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
// If this is a github commit trigger Set the external release link
|
|
||||||
stage("Set ENV commit_link"){
|
|
||||||
steps{
|
|
||||||
script{
|
|
||||||
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Sanitize the release tag and strip illegal docker or github characters
|
// Sanitize the release tag and strip illegal docker or github characters
|
||||||
stage("Sanitize tag"){
|
stage("Sanitize tag"){
|
||||||
|
@ -595,11 +583,11 @@ pipeline {
|
||||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||||
echo "Pushing New release for Tag"
|
echo "Pushing New release for Tag"
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
|
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
|
||||||
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||||
"target_commitish": "master",\
|
"target_commitish": "master",\
|
||||||
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
|
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
|
||||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||||
paste -d'\\0' start releasebody.json > releasebody.json.done
|
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
||||||
|
|
|
@ -2,14 +2,11 @@
|
||||||
|
|
||||||
# jenkins variables
|
# jenkins variables
|
||||||
project_name: docker-baseimage-cloud9
|
project_name: docker-baseimage-cloud9
|
||||||
external_type: github_commit
|
external_type: os
|
||||||
release_type: stable
|
release_type: stable
|
||||||
release_tag: latest
|
release_tag: latest
|
||||||
ls_branch: master
|
ls_branch: master
|
||||||
repo_vars:
|
repo_vars:
|
||||||
- EXT_GIT_BRANCH = 'master'
|
|
||||||
- EXT_USER = 'c9'
|
|
||||||
- EXT_REPO = 'core'
|
|
||||||
- BUILD_VERSION_ARG = 'CLOUD9_VERSION'
|
- BUILD_VERSION_ARG = 'CLOUD9_VERSION'
|
||||||
- LS_USER = 'linuxserver'
|
- LS_USER = 'linuxserver'
|
||||||
- LS_REPO = 'docker-baseimage-cloud9'
|
- LS_REPO = 'docker-baseimage-cloud9'
|
||||||
|
|
Ładowanie…
Reference in New Issue