From 35d1c5409f5c287327cfec9026adfcebaa3a30dc Mon Sep 17 00:00:00 2001 From: aptalca Date: Mon, 29 Nov 2021 14:14:55 -0500 Subject: [PATCH] insiders initial release --- .github/CONTRIBUTING.md | 4 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/external_trigger.yml | 24 +++--- .github/workflows/greetings.yml | 4 +- .github/workflows/package_trigger.yml | 14 ++-- Dockerfile | 8 +- Dockerfile.aarch64 | 8 +- Dockerfile.armhf | 8 +- Jenkinsfile | 98 +++++++++++------------ README.md | 14 +++- jenkins-vars.yml | 8 +- readme-vars.yml | 4 +- root/etc/cont-init.d/30-config | 4 +- root/etc/services.d/openvscode-server/run | 2 +- 14 files changed, 108 insertions(+), 94 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d649d79..56fde2d 100755 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -24,7 +24,7 @@ ## Readme If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit. -Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-openvscode-server/edit/main/readme-vars.yml). +Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-openvscode-server/edit/insiders/readme-vars.yml). These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play. Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-openvscode-server) @@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Update the changelog -If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-openvscode-server/tree/main/root), add an entry to the changelog +If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-openvscode-server/tree/insiders/root), add an entry to the changelog ```yml changelogs: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bcb6c66..8280be6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,7 +21,7 @@ ------------------------------ - - [ ] I have read the [contributing](https://github.com/linuxserver/docker-openvscode-server/blob/main/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications + - [ ] I have read the [contributing](https://github.com/linuxserver/docker-openvscode-server/blob/insiders/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications ------------------------------ diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index b6e3a8c..2c49185 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -4,24 +4,24 @@ on: workflow_dispatch: jobs: - external-trigger-main: + external-trigger-insiders: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.3 - name: External Trigger - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/insiders' run: | - if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_OPENVSCODE_SERVER_MAIN }}" ]; then - echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_OPENVSCODE_SERVER_MAIN is set; skipping trigger. ****" + if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_OPENVSCODE_SERVER_INSIDERS }}" ]; then + echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_OPENVSCODE_SERVER_INSIDERS is set; skipping trigger. ****" exit 0 fi - echo "**** External trigger running off of main branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_OPENVSCODE_SERVER_MAIN\". ****" + echo "**** External trigger running off of insiders branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_OPENVSCODE_SERVER_INSIDERS\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest | jq -r '. | .tag_name' | sed 's|^openvscode-server-v||') + EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/gitpod-io/openvscode-server/releases | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' | sed 's|^openvscode-server-insiders-v||') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" - FAILURE_REASON="Can't retrieve external version for openvscode-server branch main" + FAILURE_REASON="Can't retrieve external version for openvscode-server branch insiders" GHA_TRIGGER_URL="https://github.com/linuxserver/docker-openvscode-server/actions/runs/${{ github.run_id }}" curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}], @@ -32,7 +32,7 @@ jobs: echo "**** External version: ${EXT_RELEASE} ****" echo "**** Retrieving last pushed version ****" image="linuxserver/openvscode-server" - tag="latest" + tag="insiders" token=$(curl -sX GET \ "https://ghcr.io/token?scope=repository%3Alinuxserver%2Fopenvscode-server%3Apull" \ | jq -r '.token') @@ -54,7 +54,7 @@ jobs: IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}') if [ -z "${IMAGE_VERSION}" ]; then echo "**** Can't retrieve last pushed version, exiting ****" - FAILURE_REASON="Can't retrieve last pushed version for openvscode-server tag latest" + FAILURE_REASON="Can't retrieve last pushed version for openvscode-server tag insiders" curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}], "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} @@ -64,13 +64,13 @@ jobs: if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then echo "**** Version ${EXT_RELEASE} already pushed, exiting ****" exit 0 - elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then + elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/insiders/lastBuild/api/json | jq -r '.building') == "true" ]; then echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****" exit 0 else echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****" response=$(curl -iX POST \ - https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/main/buildWithParameters?PACKAGE_CHECK=false \ + https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/insiders/buildWithParameters?PACKAGE_CHECK=false \ --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") echo "**** Jenkins job queue url: ${response%$'\r'} ****" echo "**** Sleeping 10 seconds until job starts ****" @@ -85,7 +85,7 @@ jobs: --data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ --data-urlencode "Submit=Submit" echo "**** Notifying Discord ****" - TRIGGER_REASON="A version change was detected for openvscode-server tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}" + TRIGGER_REASON="A version change was detected for openvscode-server tag insiders. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}" curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, "description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}], "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 491b317..868e408 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -8,6 +8,6 @@ jobs: steps: - uses: actions/first-interaction@v1 with: - issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-openvscode-server/blob/main/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-openvscode-server/blob/main/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!' - pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-openvscode-server/blob/main/.github/PULL_REQUEST_TEMPLATE.md)!' + issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-openvscode-server/blob/insiders/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-openvscode-server/blob/insiders/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!' + pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-openvscode-server/blob/insiders/.github/PULL_REQUEST_TEMPLATE.md)!' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/package_trigger.yml b/.github/workflows/package_trigger.yml index 8b910ac..85d75aa 100644 --- a/.github/workflows/package_trigger.yml +++ b/.github/workflows/package_trigger.yml @@ -4,25 +4,25 @@ on: workflow_dispatch: jobs: - package-trigger-main: + package-trigger-insiders: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.3 - name: Package Trigger - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/insiders' run: | - if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_OPENVSCODE_SERVER_MAIN }}" ]; then - echo "**** Github secret PAUSE_PACKAGE_TRIGGER_OPENVSCODE_SERVER_MAIN is set; skipping trigger. ****" + if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_OPENVSCODE_SERVER_INSIDERS }}" ]; then + echo "**** Github secret PAUSE_PACKAGE_TRIGGER_OPENVSCODE_SERVER_INSIDERS is set; skipping trigger. ****" exit 0 fi - if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then + if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/insiders/lastBuild/api/json | jq -r '.building') == "true" ]; then echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****" exit 0 fi - echo "**** Package trigger running off of main branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_OPENVSCODE_SERVER_MAIN\". ****" + echo "**** Package trigger running off of insiders branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_OPENVSCODE_SERVER_INSIDERS\". ****" response=$(curl -iX POST \ - https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/main/buildWithParameters?PACKAGE_CHECK=true \ + https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/insiders/buildWithParameters?PACKAGE_CHECK=true \ --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") echo "**** Jenkins job queue url: ${response%$'\r'} ****" echo "**** Sleeping 10 seconds until job starts ****" diff --git a/Dockerfile b/Dockerfile index 7e91927..37f20a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,14 +22,14 @@ RUN \ sudo && \ echo "**** install openvscode-server ****" && \ if [ -z ${CODE_RELEASE+x} ]; then \ - CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]' \ - | sed 's|^openvscode-server-v||'); \ + CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscode-server/releases" \ + | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' \ + | sed 's|^openvscode-server-insiders-v||'); \ fi && \ mkdir -p /app/openvscode-server && \ curl -o \ /tmp/openvscode-server.tar.gz -L \ - "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v${CODE_RELEASE}/openvscode-server-v${CODE_RELEASE}-linux-x64.tar.gz" && \ + "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-insiders-v${CODE_RELEASE}/openvscode-server-insiders-v${CODE_RELEASE}-linux-x64.tar.gz" && \ tar xf \ /tmp/openvscode-server.tar.gz -C \ /app/openvscode-server/ --strip-components=1 && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2003e69..1ddeb59 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -22,14 +22,14 @@ RUN \ sudo && \ echo "**** install openvscode-server ****" && \ if [ -z ${CODE_RELEASE+x} ]; then \ - CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]' \ - | sed 's|^openvscode-server-v||'); \ + CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscode-server/releases" \ + | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' \ + | sed 's|^openvscode-server-insiders-v||'); \ fi && \ mkdir -p /app/openvscode-server && \ curl -o \ /tmp/openvscode-server.tar.gz -L \ - "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v${CODE_RELEASE}/openvscode-server-v${CODE_RELEASE}-linux-arm64.tar.gz" && \ + "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-insiders-v${CODE_RELEASE}/openvscode-server-insiders-v${CODE_RELEASE}-linux-arm64.tar.gz" && \ tar xf \ /tmp/openvscode-server.tar.gz -C \ /app/openvscode-server/ --strip-components=1 && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 2807e33..da7b075 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -22,14 +22,14 @@ RUN \ sudo && \ echo "**** install openvscode-server ****" && \ if [ -z ${CODE_RELEASE+x} ]; then \ - CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]' \ - | sed 's|^openvscode-server-v||'); \ + CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/gitpod-io/openvscode-server/releases" \ + | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' \ + | sed 's|^openvscode-server-insiders-v||'); \ fi && \ mkdir -p /app/openvscode-server && \ curl -o \ /tmp/openvscode-server.tar.gz -L \ - "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v${CODE_RELEASE}/openvscode-server-v${CODE_RELEASE}-linux-armhf.tar.gz" && \ + "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-insiders-v${CODE_RELEASE}/openvscode-server-insiders-v${CODE_RELEASE}-linux-armhf.tar.gz" && \ tar xf \ /tmp/openvscode-server.tar.gz -C \ /app/openvscode-server/ --strip-components=1 && \ diff --git a/Jenkinsfile b/Jenkinsfile index 9333d2e..34a0d25 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,7 +42,7 @@ pipeline { script{ env.EXIT_STATUS = '' env.LS_RELEASE = sh( - script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', + script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':insiders 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', returnStdout: true).trim() env.LS_RELEASE_NOTES = sh( script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''', @@ -104,7 +104,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sX GET https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest | jq -r '. | .tag_name' | sed 's|^openvscode-server-v||' ''', + script: ''' curl -sX GET https://api.github.com/repos/gitpod-io/openvscode-server/releases | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' | sed 's|^openvscode-server-insiders-v||' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } @@ -137,10 +137,10 @@ pipeline { } } } - // If this is a main build use live docker endpoints + // If this is a insiders build use live docker endpoints stage("Set ENV live build"){ when { - branch "main" + branch "insiders" environment name: 'CHANGE_ID', value: '' } steps { @@ -150,20 +150,20 @@ pipeline { env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'amd64-insiders-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-insiders-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-insiders-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } else { - env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'insiders-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER - env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER - env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'insiders-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.EXT_RELEASE_TAG = 'insiders-version-' + env.EXT_RELEASE_CLEAN } } } // If this is a dev build use dev docker endpoints stage("Set ENV dev build"){ when { - not {branch "main"} + not {branch "insiders"} environment name: 'CHANGE_ID', value: '' } steps { @@ -173,13 +173,13 @@ pipeline { env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'amd64-insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } else { - env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA - env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA - env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.EXT_RELEASE_TAG = 'insiders-version-' + env.EXT_RELEASE_CLEAN env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/' } } @@ -196,13 +196,13 @@ pipeline { env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'amd64-insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST } else { - env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST - env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST - env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'insiders-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + env.EXT_RELEASE_TAG = 'insiders-version-' + env.EXT_RELEASE_CLEAN env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/' } @@ -240,7 +240,7 @@ pipeline { // Use helper containers to render templated files stage('Update-Templates') { when { - branch "main" + branch "insiders" environment name: 'CHANGE_ID', value: '' expression { env.CONTAINER_NAME != null @@ -251,13 +251,13 @@ pipeline { set -e TEMPDIR=$(mktemp -d) docker pull ghcr.io/linuxserver/jenkins-builder:latest - docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=main -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest + docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=insiders -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest # Stage 1 - Jenkinsfile update if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f main + git checkout -f insiders cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ git add Jenkinsfile git commit -m 'Bot Updating Templated Files' @@ -280,7 +280,7 @@ pipeline { mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f main + git checkout -f insiders for i in ${TEMPLATES_TO_DELETE}; do git rm "${i}" done @@ -301,7 +301,7 @@ pipeline { mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f main + git checkout -f insiders cd ${TEMPDIR}/docker-${CONTAINER_NAME} mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE @@ -357,7 +357,7 @@ pipeline { // Exit the build if the Templated files were just updated stage('Template-exit') { when { - branch "main" + branch "insiders" environment name: 'CHANGE_ID', value: '' environment name: 'FILES_UPDATED', value: 'true' expression { @@ -396,7 +396,7 @@ pipeline { // Add package to Scarf.sh and set permissions stage("Scarf.sh package registry"){ when { - branch "main" + branch "insiders" environment name: 'EXIT_STATUS', value: '' } steps{ @@ -565,7 +565,7 @@ pipeline { // Take the image we just built and dump package versions for comparison stage('Update-packages') { when { - branch "main" + branch "insiders" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } @@ -602,7 +602,7 @@ pipeline { echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github" if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO} - git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f main + git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f insiders cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/ cd ${TEMPDIR}/${LS_REPO}/ wait @@ -626,7 +626,7 @@ pipeline { // Exit the build if the package file was just updated stage('PACKAGE-exit') { when { - branch "main" + branch "insiders" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'true' environment name: 'EXIT_STATUS', value: '' @@ -647,7 +647,7 @@ pipeline { // Exit the build if this is just a package check and there are no changes to push stage('PACKAGECHECK-exit') { when { - branch "main" + branch "insiders" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'false' environment name: 'EXIT_STATUS', value: '' @@ -750,10 +750,10 @@ pipeline { echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG} - docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest + docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:insiders docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG} docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER} - docker push ${PUSHIMAGE}:latest + docker push ${PUSHIMAGE}:insiders docker push ${PUSHIMAGE}:${META_TAG} docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG} docker push ${PUSHIMAGE}:${SEMVER} @@ -765,7 +765,7 @@ pipeline { docker rmi \ ${DELETEIMAGE}:${META_TAG} \ ${DELETEIMAGE}:${EXT_RELEASE_TAG} \ - ${DELETEIMAGE}:latest \ + ${DELETEIMAGE}:insiders \ ${DELETEIMAGE}:${SEMVER} || : done ''' @@ -810,9 +810,9 @@ pipeline { docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest - docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest - docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest + docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-insiders + docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-insiders + docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-insiders docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} @@ -822,19 +822,19 @@ pipeline { docker push ${MANIFESTIMAGE}:amd64-${META_TAG} docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker push ${MANIFESTIMAGE}:amd64-latest - docker push ${MANIFESTIMAGE}:arm32v7-latest - docker push ${MANIFESTIMAGE}:arm64v8-latest + docker push ${MANIFESTIMAGE}:amd64-insiders + docker push ${MANIFESTIMAGE}:arm32v7-insiders + docker push ${MANIFESTIMAGE}:arm64v8-insiders docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} docker push ${MANIFESTIMAGE}:amd64-${SEMVER} docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER} docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER} - docker manifest push --purge ${MANIFESTIMAGE}:latest || : - docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest - docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm - docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8 + docker manifest push --purge ${MANIFESTIMAGE}:insiders || : + docker manifest create ${MANIFESTIMAGE}:insiders ${MANIFESTIMAGE}:amd64-insiders ${MANIFESTIMAGE}:arm32v7-insiders ${MANIFESTIMAGE}:arm64v8-insiders + docker manifest annotate ${MANIFESTIMAGE}:insiders ${MANIFESTIMAGE}:arm32v7-insiders --os linux --arch arm + docker manifest annotate ${MANIFESTIMAGE}:insiders ${MANIFESTIMAGE}:arm64v8-insiders --os linux --arch arm64 --variant v8 docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || : docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm @@ -847,7 +847,7 @@ pipeline { docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8 - docker manifest push --purge ${MANIFESTIMAGE}:latest + docker manifest push --purge ${MANIFESTIMAGE}:insiders docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} @@ -858,15 +858,15 @@ pipeline { for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do docker rmi \ ${DELETEIMAGE}:amd64-${META_TAG} \ - ${DELETEIMAGE}:amd64-latest \ + ${DELETEIMAGE}:amd64-insiders \ ${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \ ${DELETEIMAGE}:amd64-${SEMVER} \ ${DELETEIMAGE}:arm32v7-${META_TAG} \ - ${DELETEIMAGE}:arm32v7-latest \ + ${DELETEIMAGE}:arm32v7-insiders \ ${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \ ${DELETEIMAGE}:arm32v7-${SEMVER} \ ${DELETEIMAGE}:arm64v8-${META_TAG} \ - ${DELETEIMAGE}:arm64v8-latest \ + ${DELETEIMAGE}:arm64v8-insiders \ ${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} \ ${DELETEIMAGE}:arm64v8-${SEMVER} || : done @@ -880,7 +880,7 @@ pipeline { // If this is a public release tag it in the LS Github stage('Github-Tag-Push-Release') { when { - branch "main" + branch "insiders" expression { env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } @@ -892,17 +892,17 @@ pipeline { sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ -d '{"tag":"'${META_TAG}'",\ "object": "'${COMMIT_SHA}'",\ - "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\ + "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to insiders",\ "type": "commit",\ "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' echo "Pushing New release for Tag" sh '''#! /bin/bash echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json echo '{"tag_name":"'${META_TAG}'",\ - "target_commitish": "main",\ + "target_commitish": "insiders",\ "name": "'${META_TAG}'",\ "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start - printf '","draft": false,"prerelease": false}' >> releasebody.json + printf '","draft": false,"prerelease": true}' >> releasebody.json 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''' } diff --git a/README.md b/README.md index 2119f51..17763f5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - + [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io) @@ -36,7 +36,7 @@ Find us at: [![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/openvscode-server) [![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/openvscode-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/openvscode-server) [![Docker Stars](https://img.shields.io/docker/stars/linuxserver/openvscode-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/openvscode-server) -[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-openvscode-server%2Fjob%2Fmain%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/main/) +[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-openvscode-server%2Fjob%2Finsiders%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-openvscode-server/job/insiders/) [![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fopenvscode-server%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/openvscode-server/latest/index.html) [Openvscode-server](https://github.com/gitpod-io/openvscode-server) provides a version of VS Code that runs a server on a remote machine and allows access through a modern web browser. @@ -57,6 +57,15 @@ The architectures supported by this image are: | arm64 | arm64v8-latest | | armhf | arm32v7-latest | +## Version Tags + +This image provides various versions that are available via tags. `latest` tag usually provides the latest stable version. Others are considered under development and caution must be exercised when using them. + +| Tag | Description | +| :----: | --- | +| latest | Stable releases | +| insiders | Insiders releases | + ## Application Setup Access the webui at `http://:3000?tkn=supersecrettoken`. If `CONNECTION_TOKEN` or `CONNECTION_SECRET` env vars are set, replace `supersecrettoken` with the value set. If not, view the container logs (`docker logs openvscode-server`) to see the randomly generated token and replace `supersecrettoken` with that. @@ -234,4 +243,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **29.11.21:** - Release `insiders` tag. * **28.11.21:** - Initial Release. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 6115bc5..e3f8bff 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,10 +3,10 @@ # jenkins variables project_name: docker-openvscode-server external_type: na -custom_version_command: "curl -sX GET https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest | jq -r '. | .tag_name' | sed 's|^openvscode-server-v||'" -release_type: stable -release_tag: latest -ls_branch: main +custom_version_command: "curl -sX GET https://api.github.com/repos/gitpod-io/openvscode-server/releases | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' | sed 's|^openvscode-server-insiders-v||'" +release_type: prerelease +release_tag: insiders +ls_branch: insiders repo_vars: - CONTAINER_NAME = 'openvscode-server' - BUILD_VERSION_ARG = 'CODE_RELEASE' diff --git a/readme-vars.yml b/readme-vars.yml index 9f11d5c..8fb0802 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -14,9 +14,10 @@ available_architectures: - { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"} # development version -development_versions: false +development_versions: true development_versions_items: - { tag: "latest", desc: "Stable releases" } + - { tag: "insiders", desc: "Insiders releases" } # container parameters common_param_env_vars_enabled: true @@ -56,4 +57,5 @@ app_setup_block: | # changelog changelogs: + - { date: "29.11.21:", desc: "Release `insiders` tag." } - { date: "28.11.21:", desc: "Initial Release." } diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index a2aac58..b76f75e 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -36,4 +36,6 @@ else chown abc:abc /config/workspace fi chmod 700 /config/.ssh -chmod 600 /config/.ssh/* +if [ -n "$(ls -A /config/.ssh)" ]; then + chmod 600 /config/.ssh/* +fi \ No newline at end of file diff --git a/root/etc/services.d/openvscode-server/run b/root/etc/services.d/openvscode-server/run index 3c11220..0d4876d 100644 --- a/root/etc/services.d/openvscode-server/run +++ b/root/etc/services.d/openvscode-server/run @@ -4,7 +4,7 @@ if [ -n "$CONNECTION_SECRET" ]; then CODE_ARGS="${CODE_ARGS} --connection-secret ${CONNECTION_SECRET}" echo "Using connection secret from ${CONNECTION_SECRET}" elif [ -n "$CONNECTION_TOKEN" ]; then - CODE_ARGS="${CODE_ARGS} --connectionToken ${CONNECTION_TOKEN}" + CODE_ARGS="${CODE_ARGS} --connection-token ${CONNECTION_TOKEN}" echo "Using connection token ${CONNECTION_TOKEN}" else if [ ! -f "/config/.secretkey" ]; then