Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 4186019

Browse files
committed
change to pulling compiled bins from a tag for rebuilds and using an OS tag based on package versions
1 parent df41139 commit 4186019

File tree

5 files changed

+14
-125
lines changed

5 files changed

+14
-125
lines changed

Dockerfile

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,4 @@
1-
FROM lsiobase/ubuntu:bionic as builder
2-
3-
ARG DEBIAN_FRONTEND="noninteractive"
4-
ARG NPM_CONFIG_UNSAFE_PERM=true
5-
6-
RUN \
7-
echo "**** install build packages ****" && \
8-
apt-get update && \
9-
apt-get install -y \
10-
g++ \
11-
gcc \
12-
git \
13-
make \
14-
python && \
15-
echo "**** Compile Cloud9 from source ****" && \
16-
git clone --depth 1 \
17-
https://github.com/c9/core.git c9sdk && \
18-
cd c9sdk && \
19-
mkdir -p /c9bins && \
20-
HOME=/c9bins scripts/install-sdk.sh && \
21-
echo "**** Restructure files for copy ****" && \
22-
mkdir -p \
23-
/buildout && \
24-
rm -Rf \
25-
/c9bins/.c9/tmp && \
26-
mv \
27-
/c9bins \
28-
/buildout/c9bins && \
29-
mv \
30-
/c9sdk \
31-
/buildout/
32-
33-
# runtime stage
1+
FROM lsiobase/cloud9:files as builder
342
FROM lsiobase/ubuntu:bionic
353

364
# set version label

Dockerfile.aarch64

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,4 @@
1-
FROM lsiobase/ubuntu:arm64v8-bionic as builder
2-
3-
ARG DEBIAN_FRONTEND="noninteractive"
4-
ARG NPM_CONFIG_UNSAFE_PERM=true
5-
6-
RUN \
7-
echo "**** install build packages ****" && \
8-
apt-get update && \
9-
apt-get install -y \
10-
g++ \
11-
gcc \
12-
git \
13-
make \
14-
python && \
15-
echo "**** Compile Cloud9 from source ****" && \
16-
git clone --depth 1 \
17-
https://github.com/c9/core.git c9sdk && \
18-
cd c9sdk && \
19-
mkdir -p /c9bins && \
20-
HOME=/c9bins scripts/install-sdk.sh && \
21-
echo "**** Restructure files for copy ****" && \
22-
mkdir -p \
23-
/buildout && \
24-
rm -Rf \
25-
/c9bins/.c9/tmp && \
26-
mv \
27-
/c9bins \
28-
/buildout/c9bins && \
29-
mv \
30-
/c9sdk \
31-
/buildout/
32-
33-
# runtime stage
1+
FROM lsiobase/cloud9:arm64v8-files as builder
342
FROM lsiobase/ubuntu:arm64v8-bionic
353

364
# set version label

Dockerfile.armhf

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,4 @@
1-
FROM lsiobase/ubuntu:arm32v7-bionic as builder
2-
3-
ARG DEBIAN_FRONTEND="noninteractive"
4-
ARG NPM_CONFIG_UNSAFE_PERM=true
5-
6-
RUN \
7-
echo "**** install build packages ****" && \
8-
apt-get update && \
9-
apt-get install -y \
10-
g++ \
11-
gcc \
12-
git \
13-
make \
14-
python && \
15-
echo "**** Compile Cloud9 from source ****" && \
16-
git clone --depth 1 \
17-
https://github.com/c9/core.git c9sdk && \
18-
cd c9sdk && \
19-
mkdir -p /c9bins && \
20-
HOME=/c9bins scripts/install-sdk.sh && \
21-
echo "**** Restructure files for copy ****" && \
22-
mkdir -p \
23-
/buildout && \
24-
rm -Rf \
25-
/c9bins/.c9/tmp && \
26-
mv \
27-
/c9bins \
28-
/buildout/c9bins && \
29-
mv \
30-
/c9sdk \
31-
/buildout/
32-
33-
# runtime stage
1+
FROM lsiobase/cloud9:arm32v7-files as builder
342
FROM lsiobase/ubuntu:arm32v7-bionic
353

364
# set version label

Jenkinsfile

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ pipeline {
1010
environment {
1111
BUILDS_DISCORD=credentials('build_webhook_url')
1212
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
13-
EXT_GIT_BRANCH = 'master'
14-
EXT_USER = 'c9'
15-
EXT_REPO = 'core'
1613
BUILD_VERSION_ARG = 'CLOUD9_VERSION'
1714
LS_USER = 'linuxserver'
1815
LS_REPO = 'docker-baseimage-cloud9'
@@ -102,23 +99,14 @@ pipeline {
10299
/* ########################
103100
External Release Tagging
104101
######################## */
105-
// If this is a github commit trigger determine the current commit at head
106-
stage("Set ENV github_commit"){
107-
steps{
108-
script{
109-
env.EXT_RELEASE = sh(
110-
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''',
111-
returnStdout: true).trim()
112-
}
113-
}
114-
}
115-
// If this is a github commit trigger Set the external release link
116-
stage("Set ENV commit_link"){
117-
steps{
118-
script{
119-
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE
120-
}
121-
}
102+
// If this is an os release set release type to none to indicate no external release
103+
stage("Set ENV os"){
104+
steps{
105+
script{
106+
env.EXT_RELEASE = env.PACKAGE_TAG
107+
env.RELEASE_LINK = 'none'
108+
}
109+
}
122110
}
123111
// Sanitize the release tag and strip illegal docker or github characters
124112
stage("Sanitize tag"){
@@ -595,11 +583,11 @@ pipeline {
595583
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
596584
echo "Pushing New release for Tag"
597585
sh '''#! /bin/bash
598-
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
586+
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
599587
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
600588
"target_commitish": "master",\
601589
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
602-
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
590+
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
603591
printf '","draft": false,"prerelease": false}' >> releasebody.json
604592
paste -d'\\0' start releasebody.json > releasebody.json.done
605593
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''

jenkins-vars.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
# jenkins variables
44
project_name: docker-baseimage-cloud9
5-
external_type: github_commit
5+
external_type: os
66
release_type: stable
77
release_tag: latest
88
ls_branch: master
99
repo_vars:
10-
- EXT_GIT_BRANCH = 'master'
11-
- EXT_USER = 'c9'
12-
- EXT_REPO = 'core'
1310
- BUILD_VERSION_ARG = 'CLOUD9_VERSION'
1411
- LS_USER = 'linuxserver'
1512
- LS_REPO = 'docker-baseimage-cloud9'

0 commit comments

Comments
 (0)