mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2025-09-26 15:07:25 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ffa9d52206 | ||
|
7d0d52ceae | ||
|
f19465b3d6 | ||
|
662cfae820 | ||
|
e365f033d1 | ||
|
b8e5fcc22d | ||
|
a176ab5f20 | ||
|
9b773524ce |
5
.gitlab-ci.yml
Normal file
5
.gitlab-ci.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
include:
|
||||||
|
- project: devops/pipeline-components
|
||||||
|
ref: main
|
||||||
|
file: cloudron-app.gitlab-ci.yml
|
||||||
|
|
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1629,3 +1629,17 @@
|
|||||||
* Set owner id to zero when GetRegistrationToken for repo (#31725) (#31729)
|
* Set owner id to zero when GetRegistrationToken for repo (#31725) (#31729)
|
||||||
* Fix API endpoint for registration-token (#31722) (#31728)
|
* Fix API endpoint for registration-token (#31722) (#31728)
|
||||||
* Add permission check when creating PR (#31033) (#31720)
|
* Add permission check when creating PR (#31033) (#31720)
|
||||||
|
|
||||||
|
[1.33.3]
|
||||||
|
* Update Gitea to 1.22.3
|
||||||
|
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.3)
|
||||||
|
* Fix bug when a token is given public only (#32204) (#32218)
|
||||||
|
* Increase cacheContextLifetime to reduce false reports (#32011) (#32023)
|
||||||
|
* Don't join repository when loading action table data (#32127) (#32143)
|
||||||
|
* Fix javascript error when an anonymous user visits migration page (#32144) (#32179)
|
||||||
|
* Don't init signing keys if oauth2 provider is disabled (#32177)
|
||||||
|
* Fix wrong status of Set up Job when first step is skipped (#32120) (#32125)
|
||||||
|
* Fix bug when deleting a migrated branch (#32075) (#32123)
|
||||||
|
* Truncate commit message during Discord webhook push events (#31970) (#32121)
|
||||||
|
* Allow to set branch protection in an empty repository (#32095) (#32119)
|
||||||
|
* Fix panic when cloning with wrong ssh format. (#32076) (#32118)
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
"author": "Gitea developers",
|
"author": "Gitea developers",
|
||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"tagline": "A painless self-hosted Git Service",
|
"tagline": "A painless self-hosted Git Service",
|
||||||
"version": "1.33.2",
|
"version": "1.33.3",
|
||||||
"upstreamVersion": "1.22.2",
|
"upstreamVersion": "1.22.3",
|
||||||
"healthCheckPath": "/explore",
|
"healthCheckPath": "/explore",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
|
@@ -19,9 +19,10 @@ WORKDIR /home/git
|
|||||||
# for autosign feature
|
# for autosign feature
|
||||||
ENV GNUPGHOME="/app/data/gnupg"
|
ENV GNUPGHOME="/app/data/gnupg"
|
||||||
|
|
||||||
ARG VERSION=1.22.2
|
# renovate: datasource=github-releases depName=go-gitea/gitea versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
|
ARG GITEA_VERSION=1.22.3
|
||||||
|
|
||||||
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
RUN curl -L https://dl.gitea.io/gitea/${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
||||||
&& chmod +x /home/git/gitea/gitea
|
&& chmod +x /home/git/gitea/gitea
|
||||||
|
|
||||||
# setup config paths
|
# setup config paths
|
||||||
|
6
renovate.json
Normal file
6
renovate.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>devops/renovator//config/app/default.json5"
|
||||||
|
]
|
||||||
|
}
|
28
test/package-lock.json
generated
28
test/package-lock.json
generated
@@ -9,10 +9,10 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^128.0.1",
|
"chromedriver": "^129.0.2",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^10.7.3",
|
"mocha": "^10.7.3",
|
||||||
"selenium-webdriver": "^4.24.0",
|
"selenium-webdriver": "^4.25.0",
|
||||||
"superagent": "^10.1.0"
|
"superagent": "^10.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -270,9 +270,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chromedriver": {
|
"node_modules/chromedriver": {
|
||||||
"version": "128.0.1",
|
"version": "129.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.2.tgz",
|
||||||
"integrity": "sha512-UmWqZXXAyuRa37pE+lnU46vJcCM/y0ddF015LHxycEOYfuqsK7k9ZxJuXCQNWbws9e7FAMQj/GJZT92WPgis0g==",
|
"integrity": "sha512-rUEFCJAmAwOdFfaDFtveT97fFeA7NOxlkgyPyN+G09Ws4qGW39aLDxMQBbS9cxQQHhTihqZZobgF5CLVYXnmGA==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testim/chrome-version": "^1.1.4",
|
"@testim/chrome-version": "^1.1.4",
|
||||||
@@ -1425,9 +1425,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/selenium-webdriver": {
|
"node_modules/selenium-webdriver": {
|
||||||
"version": "4.24.0",
|
"version": "4.25.0",
|
||||||
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.25.0.tgz",
|
||||||
"integrity": "sha512-qrqoHhHPZuKLiz5VAQUxrn3ILs7/cYqn2/x96r35g5JjkLUjOS1lX+F+tEJKhRMlQ/MGJ+N1016JF5g2xZUFzw==",
|
"integrity": "sha512-zl9IX93caOT8wbcCpZzAkEtYa+hNgJ4C5GUN8uhpzggqRLvsg1asfKi0p1uNZC8buYVvsBZbx8S+9MjVAjs4oA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bazel/runfiles": "^5.8.1",
|
"@bazel/runfiles": "^5.8.1",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
@@ -1982,9 +1982,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"chromedriver": {
|
"chromedriver": {
|
||||||
"version": "128.0.1",
|
"version": "129.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.2.tgz",
|
||||||
"integrity": "sha512-UmWqZXXAyuRa37pE+lnU46vJcCM/y0ddF015LHxycEOYfuqsK7k9ZxJuXCQNWbws9e7FAMQj/GJZT92WPgis0g==",
|
"integrity": "sha512-rUEFCJAmAwOdFfaDFtveT97fFeA7NOxlkgyPyN+G09Ws4qGW39aLDxMQBbS9cxQQHhTihqZZobgF5CLVYXnmGA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@testim/chrome-version": "^1.1.4",
|
"@testim/chrome-version": "^1.1.4",
|
||||||
"axios": "^1.7.4",
|
"axios": "^1.7.4",
|
||||||
@@ -2802,9 +2802,9 @@
|
|||||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||||
},
|
},
|
||||||
"selenium-webdriver": {
|
"selenium-webdriver": {
|
||||||
"version": "4.24.0",
|
"version": "4.25.0",
|
||||||
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.25.0.tgz",
|
||||||
"integrity": "sha512-qrqoHhHPZuKLiz5VAQUxrn3ILs7/cYqn2/x96r35g5JjkLUjOS1lX+F+tEJKhRMlQ/MGJ+N1016JF5g2xZUFzw==",
|
"integrity": "sha512-zl9IX93caOT8wbcCpZzAkEtYa+hNgJ4C5GUN8uhpzggqRLvsg1asfKi0p1uNZC8buYVvsBZbx8S+9MjVAjs4oA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@bazel/runfiles": "^5.8.1",
|
"@bazel/runfiles": "^5.8.1",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
|
@@ -9,10 +9,10 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^128.0.1",
|
"chromedriver": "^129.0.2",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^10.7.3",
|
"mocha": "^10.7.3",
|
||||||
"selenium-webdriver": "^4.24.0",
|
"selenium-webdriver": "^4.25.0",
|
||||||
"superagent": "^10.1.0"
|
"superagent": "^10.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
52
test/test.js
52
test/test.js
@@ -1,11 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
/* jshint esversion: 8 */
|
/* jshint esversion: 8 */
|
||||||
/* global it:false */
|
/* global it, xit, describe, before, after, afterEach */
|
||||||
/* global xit:false */
|
|
||||||
/* global describe:false */
|
|
||||||
/* global before:false */
|
|
||||||
/* global after:false */
|
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -29,21 +25,23 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
const TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000;
|
const TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000;
|
||||||
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||||
const LOCATION = 'test';
|
const LOCATION = process.env.LOCATION || 'test';
|
||||||
const SSH_PORT = 29420;
|
const SSH_PORT = 29420;
|
||||||
|
|
||||||
let app, browser;
|
let app, browser;
|
||||||
var athenticated_by_oidc = false;
|
let athenticated_by_oidc = false;
|
||||||
|
|
||||||
const repodir = '/tmp/testrepo';
|
const repodir = '/tmp/testrepo';
|
||||||
const reponame = 'testrepo';
|
const reponame = 'testrepo';
|
||||||
|
|
||||||
const username = process.env.USERNAME;
|
const username = process.env.USERNAME;
|
||||||
const password = process.env.PASSWORD;
|
const password = process.env.PASSWORD;
|
||||||
const email = process.env.EMAIL;
|
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
|
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 });
|
||||||
|
if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless');
|
||||||
|
browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
|
||||||
|
if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots');
|
||||||
});
|
});
|
||||||
|
|
||||||
after(function () {
|
after(function () {
|
||||||
@@ -51,8 +49,19 @@ describe('Application life cycle test', function () {
|
|||||||
fs.rmSync(repodir, { recursive: true, force: true });
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(async function () {
|
||||||
|
if (!process.env.CI || !app) return;
|
||||||
|
|
||||||
|
const currentUrl = await browser.getCurrentUrl();
|
||||||
|
if (!currentUrl.includes(app.domain)) return;
|
||||||
|
expect(this.currentTest.title).to.be.a('string');
|
||||||
|
|
||||||
|
const screenshotData = await browser.takeScreenshot();
|
||||||
|
fs.writeFileSync(`./screenshots/${new Date().getTime()}-${this.currentTest.title.replaceAll(' ', '_')}.png`, screenshotData, 'base64');
|
||||||
|
});
|
||||||
|
|
||||||
function getAppInfo() {
|
function getAppInfo() {
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
const inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
||||||
expect(app).to.be.an('object');
|
expect(app).to.be.an('object');
|
||||||
}
|
}
|
||||||
@@ -132,7 +141,8 @@ describe('Application life cycle test', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function addPublicKey() {
|
async function addPublicKey() {
|
||||||
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
|
const publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
|
||||||
|
execSync(`chmod g-rw,o-rw ${__dirname}/id_ed25519`); // ssh will complain about perms later
|
||||||
|
|
||||||
await browser.get('https://' + app.fqdn + '/user/settings/keys');
|
await browser.get('https://' + app.fqdn + '/user/settings/keys');
|
||||||
|
|
||||||
@@ -147,25 +157,9 @@ describe('Application life cycle test', function () {
|
|||||||
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addPublicKeyOld() {
|
|
||||||
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
|
|
||||||
|
|
||||||
await browser.get('https://' + app.fqdn + '/user/settings/keys');
|
|
||||||
|
|
||||||
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
|
|
||||||
await browser.findElement(By.id('add-ssh-button')).click();
|
|
||||||
await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
|
|
||||||
await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
|
||||||
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
|
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
|
||||||
await browser.findElement(By.xpath('//button[contains(text(), "Add Key") and contains(@class, "green")]')).click();
|
|
||||||
|
|
||||||
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function createRepo() {
|
async function createRepo() {
|
||||||
var getRepoPage = await browser.get('https://' + app.fqdn + '/repo/create');
|
await browser.get(`https://${app.fqdn}/repo/create`);
|
||||||
|
await browser.wait(until.elementLocated(By.id('repo_name')));
|
||||||
await browser.findElement(By.id('repo_name')).sendKeys(reponame);
|
await browser.findElement(By.id('repo_name')).sendKeys(reponame);
|
||||||
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
|
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
||||||
|
Reference in New Issue
Block a user